Use predication instead of pseudo-opcodes when folding into MOVCC.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Sep 2012 23:58:02 +0000 (23:58 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Sep 2012 23:58:02 +0000 (23:58 +0000)
commit098c6a547fe540b3bbace4c3d4713f400c67b8a9
tree423e7a59c4df5905f14f8c8ff446868cfd55078e
parent366df7945f0e65052d2e1df701ae1fd16b943642
Use predication instead of pseudo-opcodes when folding into MOVCC.

Now that it is possible to dynamically tie MachineInstr operands,
predicated instructions are possible in SSA form:

  %vreg3<def> = SUBri %vreg1, -2147483647, pred:14, pred:%noreg, %opt:%noreg
  %vreg4<def,tied1> = MOVCCr %vreg3<tied0>, %vreg1, %pred:12, pred:%CPSR

Becomes a predicated SUBri with a tied imp-use:

  SUBri %vreg1, -2147483647, pred:13, pred:%CPSR, opt:%noreg, %vreg1<imp-use,tied0>

This means that any instruction that is safe to move can be folded into
a MOVCC, and the *CC pseudo-instructions are no longer needed.

The test case changes reflect that Thumb2SizeReduce recognizes the
predicated instructions. It didn't understand the pseudos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163274 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/select.ll
test/CodeGen/ARM/select_xform.ll
test/CodeGen/Thumb2/thumb2-select_xform.ll