[llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td ARMInstrThumb.td
Evan Cheng
evan.cheng at apple.com
Mon Mar 19 00:09:49 PDT 2007
Changes in directory llvm/lib/Target/ARM:
ARMInstrInfo.td updated: 1.88 -> 1.89
ARMInstrThumb.td updated: 1.14 -> 1.15
---
Log message:
Constant generation instructions are re-materializable.
---
Diffs of the changes: (+11 -5)
ARMInstrInfo.td | 15 ++++++++++-----
ARMInstrThumb.td | 1 +
2 files changed, 11 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/ARM/ARMInstrInfo.td
diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.88 llvm/lib/Target/ARM/ARMInstrInfo.td:1.89
--- llvm/lib/Target/ARM/ARMInstrInfo.td:1.88 Sat Feb 3 03:11:58 2007
+++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Mar 19 02:09:02 2007
@@ -137,7 +137,7 @@
PatLeaf<(imm), [{ return ARM_AM::getSOImmVal(-(int)N->getValue()) != -1; }],
so_imm_neg_XFORM>;
-def so_imm_not :
+def so_imm_not :
PatLeaf<(imm), [{ return ARM_AM::getSOImmVal(~(int)N->getValue()) != -1; }],
so_imm_not_XFORM>;
@@ -709,6 +709,8 @@
"mov $dst, $src", []>;
def MOVrs : AI1<(ops GPR:$dst, so_reg:$src),
"mov $dst, $src", [(set GPR:$dst, so_reg:$src)]>;
+
+let isReMaterializable = 1 in
def MOVri : AI1<(ops GPR:$dst, so_imm:$src),
"mov $dst, $src", [(set GPR:$dst, so_imm:$src)]>;
@@ -806,10 +808,13 @@
defm EOR : AI1_bin_irs<"eor", BinOpFrag<(xor node:$LHS, node:$RHS)>>;
defm BIC : AI1_bin_irs<"bic", BinOpFrag<(and node:$LHS, (not node:$RHS))>>;
-defm MVN : AI1_unary_irs<"mvn", not>;
-
-def : ARMPat<(i32 so_imm_not:$imm),
- (MVNi so_imm_not:$imm)>;
+def MVNr : AI<(ops GPR:$dst, GPR:$src),
+ "mvn $dst, $src", [(set GPR:$dst, (not GPR:$src))]>;
+def MVNs : AI<(ops GPR:$dst, so_reg:$src),
+ "mvn $dst, $src", [(set GPR:$dst, (not so_reg:$src))]>;
+let isReMaterializable = 1 in
+def MVNi : AI<(ops GPR:$dst, so_imm:$imm),
+ "mvn $dst, $imm", [(set GPR:$dst, so_imm_not:$imm)]>;
def : ARMPat<(and GPR:$src, so_imm_not:$imm),
(BICri GPR:$src, so_imm_not:$imm)>;
Index: llvm/lib/Target/ARM/ARMInstrThumb.td
diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.14 llvm/lib/Target/ARM/ARMInstrThumb.td:1.15
--- llvm/lib/Target/ARM/ARMInstrThumb.td:1.14 Tue Feb 6 18:06:56 2007
+++ llvm/lib/Target/ARM/ARMInstrThumb.td Mon Mar 19 02:09:02 2007
@@ -374,6 +374,7 @@
"lsr $dst, $rhs",
[(set GPR:$dst, (srl GPR:$lhs, GPR:$rhs))]>;
+let isReMaterializable = 1 in
def tMOVri8 : TI<(ops GPR:$dst, i32imm:$src),
"mov $dst, $src",
[(set GPR:$dst, imm0_255:$src)]>;
More information about the llvm-commits
mailing list