Skip to content
  • Evan Cheng's avatar
    After r147827 and r147902, it's now possible for unallocatable registers to be · 6bb95253
    Evan Cheng authored
    live across BBs before register allocation. This miscompiled 197.parser
    when a cmp + b are optimized to a cbnz instruction even though the CPSR def
    is live-in a successor.
            cbnz    r6, LBB89_12
    ...
    LBB89_12:
            ble     LBB89_1
    
    The fix consists of two parts. 1) Teach LiveVariables that some unallocatable
    registers might be liveouts so don't mark their last use as kill if they are.
    2) ARM constantpool island pass shouldn't form cbz / cbnz if the conditional
    branch does not kill CPSR.
    
    rdar://10676853
    
    llvm-svn: 148168
    6bb95253
Loading