set comparable for a bunch of Thumb instructions
authorGabor Greif <ggreif@gmail.com>
Tue, 14 Sep 2010 20:47:43 +0000 (20:47 +0000)
committerGabor Greif <ggreif@gmail.com>
Tue, 14 Sep 2010 20:47:43 +0000 (20:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113849 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb.td

index 30bec0f9d64be776c236bf18d92c68e135c55cd4..c9fcb24d0768bc2682e9f3fc5e1f3f3b78b36ed9 100644 (file)
@@ -656,7 +656,7 @@ def tCMPzi8 : T1pI<(outs), (ins tGPR:$lhs, i32imm:$rhs), IIC_iCMPi,
 }
 
 // CMP register
-let Defs = [CPSR] in {
+let isCompare = 1, Defs = [CPSR] in {
 def tCMPr : T1pI<(outs), (ins tGPR:$lhs, tGPR:$rhs), IIC_iCMPr,
                  "cmp", "\t$lhs, $rhs",
                  [(ARMcmp tGPR:$lhs, tGPR:$rhs)]>,
@@ -837,7 +837,7 @@ def tSXTH  : T1pI<(outs tGPR:$dst), (ins tGPR:$src), IIC_iUNAr,
              T1Misc<{0,0,1,0,0,0,?}>;
 
 // test
-let isCommutable = 1, Defs = [CPSR] in
+let isCompare = 1, isCommutable = 1, Defs = [CPSR] in
 def tTST  : T1pI<(outs), (ins tGPR:$lhs, tGPR:$rhs), IIC_iCMPr,
                  "tst", "\t$lhs, $rhs",
                  [(ARMcmpZ (and tGPR:$lhs, tGPR:$rhs), 0)]>,