Skip to content
  • Evan Cheng's avatar
    Remove ARM isel hacks that fold large immediates into a pair of add, sub, and, · 7f8ab6ee
    Evan Cheng authored
    and xor. The 32-bit move immediates can be hoisted out of loops by machine
    LICM but the isel hacks were preventing them.
    
    Instead, let peephole optimization pass recognize registers that are defined by
    immediates and the ARM target hook will fold the immediates in.
    
    Other changes include 1) do not fold and / xor into cmp to isel TST / TEQ
    instructions if there are multiple uses. This happens when the 'and' is live
    out, machine sink would have sinked the computation and that ends up pessimizing
    code. The peephole pass would recognize situations where the 'and' can be
    toggled to define CPSR and eliminate the comparison anyway.
    
    2) Move peephole pass to after machine LICM, sink, and CSE to avoid blocking
    important optimizations.
    
    rdar://8663787, rdar://8241368
    
    llvm-svn: 119548
    7f8ab6ee
Loading