sure, I can set a flag, but if I never check it, why bother setting it? Should fix...
authorAndrew Lenharth <andrewl@lenharth.org>
Tue, 15 Mar 2005 19:51:19 +0000 (19:51 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Tue, 15 Mar 2005 19:51:19 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20623 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Alpha/AlphaISelPattern.cpp
lib/Target/Alpha/AlphaInstrInfo.td

index 99bb9b9963f993488057a4390adbda10980c381d..0e0e0ac314bbd405f2b73810125004dd8306a237 100644 (file)
@@ -1291,8 +1291,8 @@ unsigned ISel::SelectExpr(SDOperand N) {
           BuildMI(BB, Opc, 2, Tmp3).addReg(Tmp1).addReg(Tmp2);
           
           //now arrange for Result (int) to have a 1 or 0
-          
-          BuildMI(BB, Alpha::CC2INT, 1, Result).addReg(Tmp3);
+          Opc = inv?Alpha::CC2INT_INV:Alpha::CC2INT;
+          BuildMI(BB, Opc, 1, Result).addReg(Tmp3);
 
 //           // Spill the FP to memory and reload it from there.
 //           unsigned Size = MVT::getSizeInBits(MVT::f64)/8;
index 97f0bd6b707fd869e57cdc517bfb5518cbc4e4a5..9d4b91dc6a4d91bf94abe19dcdd0be3db5ee4a6f 100644 (file)
@@ -88,8 +88,10 @@ let Uses = [R29],
 }
 
 //This is an improvement on the old style setcc (FP)
-def CC2INT : PseudoInstAlpha<(ops GPRC:$RES, FPRC:$COND), 
+def CC2INT_INV : PseudoInstAlpha<(ops GPRC:$RES, FPRC:$COND), 
   "lda $RES,1($$31)\n\tfbeq $COND, 42f\n\tbis $$31,$$31,$RES\n42:\n">;
+def CC2INT : PseudoInstAlpha<(ops GPRC:$RES, FPRC:$COND), 
+  "lda $RES,1($$31)\n\tfbne $COND, 42f\n\tbis $$31,$$31,$RES\n42:\n">;
 
 //***********************
 //Real instructions