Fold predicable instructions into MOVCC / t2MOVCC.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 15 Aug 2012 22:16:39 +0000 (22:16 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 15 Aug 2012 22:16:39 +0000 (22:16 +0000)
commit2860b7ea3a1d60213ee7228bd274bc4f8b170772
treeb01f0e59fa7da8121848824f06495d6a0509f57c
parent8dd2e5bf8331f55e099763bab2b95f7509649b84
Fold predicable instructions into MOVCC / t2MOVCC.

The ARM select instructions are just predicated moves. If the select is
the only use of an operand, the instruction defining the operand can be
predicated instead, saving one instruction and decreasing register
pressure.

This implementation can turn AND/ORR/EOR instructions into their
corresponding ANDCC/ORRCC/EORCC variants. Ideally, we should be able to
predicate any instruction, but we don't yet support predicated
instructions in SSA form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161994 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/ARM/select_xform.ll
test/CodeGen/Thumb2/machine-licm.ll