Fix two remaining issue after fixing PR15355 when CMOV is not available
authorMichael Liao <michael.liao@intel.com>
Thu, 7 Mar 2013 01:01:29 +0000 (01:01 +0000)
committerMichael Liao <michael.liao@intel.com>
Thu, 7 Mar 2013 01:01:29 +0000 (01:01 +0000)
commitfe9dbe0066ba4a35cb68fb281e6f6649ffa85ae9
treefab477c0698725f0d78685f1a26f2c6cf39fc6ae
parentb7656a9cc4bf36752df38e7c02b910c9390b9c39
Fix two remaining issue after fixing PR15355 when CMOV is not available

- Phi nodes should be replaced/updated after lowering CMOV into branch
  because 'mainMBB' updating operand in Phi node is changed.
- Add EFLAGS in livein before lowering the 2nd CMOV. It's necessary as
  we will reuse the EFLAGS generated before the 1st lowered CMOV, which
  won't clobber EFLAGS. However, we need explicitly specify that.
- '-attr=-cmov' test case are added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176598 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/atomic-minmax-i6432.ll
test/CodeGen/X86/atomic32.ll