Skip to content
  • Chris Lattner's avatar
    Fix a nasty problem on two-address machines in the following situation: · 71d20c4e
    Chris Lattner authored
    store EAX -> [ss#0]
    [ss#0] += 1
    ...
    use(EAX)
    
    In this case, it is not valid to rewrite this as:
    
    
    store EAX -> [ss#0]
    EAX += 1
    store EAX -> [ss#0]  ;;; this would also delete the store above
    ...
    use(EAX)
    
    ... because EAX is not a dead at that point.  Keep track of which registers
    we are allowed to clobber, and which ones we aren't, and don't clobber the
    ones we're not supposed to.  :)
    
    This should resolve the issues on X86 last night.
    
    llvm-svn: 25948
    71d20c4e
Loading