aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha/AlphaInstrInfo.td
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-09-20 15:05:49 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-09-20 15:05:49 +0000
commit6b634037b3bc4d0cf48b2e4760b82c08f2898aa6 (patch)
tree2bfe00b6976c1a20c4f94880e3406908a408f108 /lib/Target/Alpha/AlphaInstrInfo.td
parent0ddae493e91f6cfc9e855b098769e046fe2bfc5a (diff)
downloadexternal_llvm-6b634037b3bc4d0cf48b2e4760b82c08f2898aa6.zip
external_llvm-6b634037b3bc4d0cf48b2e4760b82c08f2898aa6.tar.gz
external_llvm-6b634037b3bc4d0cf48b2e4760b82c08f2898aa6.tar.bz2
catch constants more often
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaInstrInfo.td')
-rw-r--r--lib/Target/Alpha/AlphaInstrInfo.td14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaInstrInfo.td b/lib/Target/Alpha/AlphaInstrInfo.td
index be0d497..ceac056 100644
--- a/lib/Target/Alpha/AlphaInstrInfo.td
+++ b/lib/Target/Alpha/AlphaInstrInfo.td
@@ -214,6 +214,20 @@ def : Pat<(select GPRC:$which, GPRC:$src1, GPRC:$src2),
def : Pat<(select GPRC:$which, GPRC:$src1, immUExt8:$src2),
(CMOVEQi GPRC:$src1, immUExt8:$src2, GPRC:$which)>;
+//Invert sense when we can for constants:
+def : Pat<(select (seteq GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE),
+ (CMOVEQi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>;
+def : Pat<(select (setne GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE),
+ (CMOVNEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>;
+def : Pat<(select (setgt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE),
+ (CMOVGTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>;
+def : Pat<(select (setge GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE),
+ (CMOVGEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>;
+def : Pat<(select (setlt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE),
+ (CMOVLTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>;
+def : Pat<(select (setle GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE),
+ (CMOVLEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>;
+
def ADDL : OForm< 0x10, 0x00, "addl $RA,$RB,$RC",
[(set GPRC:$RC, (intop (add GPRC:$RA, GPRC:$RB)))], s_iadd>;