[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td

Andrew Lenharth alenhar2 at cs.uiuc.edu
Thu Mar 9 09:42:02 PST 2006



Changes in directory llvm/lib/Target/Alpha:

AlphaInstrInfo.td updated: 1.115 -> 1.116
---
Log message:

alpha and llvm have different oppinions on which arg is the sign bit

---
Diffs of the changes:  (+8 -10)

 AlphaInstrInfo.td |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.115 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.116
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.115	Thu Mar  9 11:16:45 2006
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td	Thu Mar  9 11:41:50 2006
@@ -571,11 +571,10 @@
                    [(set F4RC:$RC, (fmul F4RC:$RA, F4RC:$RB))], s_fmul>;
 
 def CPYSS  : FPForm<0x17, 0x020, "cpys $RA,$RB,$RC",
-                   [(set F4RC:$RC, (fcopysign F4RC:$RA, F4RC:$RB))], s_fadd>;
+                   [(set F4RC:$RC, (fcopysign F4RC:$RB, F4RC:$RA))], s_fadd>;
 def CPYSES : FPForm<0x17, 0x022, "cpyse $RA,$RB,$RC",[], s_fadd>; //Copy sign and exponent
-//FIXME: This might be legalized in the oposite manner
 def CPYSNS : FPForm<0x17, 0x021, "cpysn $RA,$RB,$RC",
-                   [(set F4RC:$RC, (fneg (fcopysign F4RC:$RA, F4RC:$RB)))], s_fadd>;
+                   [(set F4RC:$RC, (fneg (fcopysign F4RC:$RB, F4RC:$RA)))], s_fadd>;
 }
 
 //Doubles
@@ -595,11 +594,10 @@
                    [(set F8RC:$RC, (fmul F8RC:$RA, F8RC:$RB))], s_fmul>;
 
 def CPYST  : FPForm<0x17, 0x020, "cpys $RA,$RB,$RC",
-                   [(set F8RC:$RC, (fcopysign F8RC:$RA, F8RC:$RB))], s_fadd>;
+                   [(set F8RC:$RC, (fcopysign F8RC:$RB, F8RC:$RA))], s_fadd>;
 def CPYSET : FPForm<0x17, 0x022, "cpyse $RA,$RB,$RC",[], s_fadd>; //Copy sign and exponent
-//FIXME: This might be legalized in the oposite manner
 def CPYSNT : FPForm<0x17, 0x021, "cpysn $RA,$RB,$RC",
-                   [(set F8RC:$RC, (fneg (fcopysign F8RC:$RA, F8RC:$RB)))], s_fadd>;
+                   [(set F8RC:$RC, (fneg (fcopysign F8RC:$RB, F8RC:$RA)))], s_fadd>;
 
 def CMPTEQ : FPForm<0x16, 0x5A5, "cmpteq/su $RA,$RB,$RC", [], s_fadd>;
 //                    [(set F8RC:$RC, (seteq F8RC:$RA, F8RC:$RB))]>;
@@ -850,10 +848,10 @@
           (CPYSNT F8RC:$RB, F8RC:$RB)>;
 def : Pat<(fneg F4RC:$RB),
           (CPYSNS F4RC:$RB, F4RC:$RB)>;
-def : Pat<(fcopysign (fneg F4RC:$A), F4RC:$B),
-          (CPYSNS F4RC:$A, F4RC:$B)>;
-def : Pat<(fcopysign (fneg F8RC:$A), F8RC:$B),
-          (CPYSNT F8RC:$A, F8RC:$B)>;
+def : Pat<(fcopysign F4RC:$A, (fneg F4RC:$B)),
+          (CPYSNS F4RC:$B, F4RC:$A)>;
+def : Pat<(fcopysign F8RC:$A, (fneg F8RC:$B)),
+          (CPYSNT F8RC:$B, F8RC:$A)>;
 
 //Yes, signed multiply high is ugly
 def : Pat<(mulhs GPRC:$RA, GPRC:$RB),






More information about the llvm-commits mailing list