We were (somehow) getting the wrong branch opcode for setcc float instrs.
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 17 Nov 2004 22:06:56 +0000 (22:06 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 17 Nov 2004 22:06:56 +0000 (22:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17925 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcV8ISelSimple.cpp
lib/Target/SparcV8/SparcV8ISelSimple.cpp

index 1a67ebb36c7056f768249f1e94df0762dbb9056e..6af0bf9ab5c2c60048fa54d48a8ae944bcc7d41e 100644 (file)
@@ -1176,8 +1176,8 @@ void V8ISel::visitSetCondInst(SetCondInst &I) {
   case Instruction::SetGE: BranchIdx = 5; break;
   }
   unsigned Column = 0;
-  if (Ty->isSigned()) ++Column;
-  if (Ty->isFloatingPoint()) ++Column;
+  if (Ty->isSigned() && !Ty->isFloatingPoint()) Column = 1;
+  if (Ty->isFloatingPoint()) Column = 2;
   static unsigned OpcodeTab[3*6] = {
                                  // LLVM            SparcV8
                                  //        unsigned signed  fp
index 1a67ebb36c7056f768249f1e94df0762dbb9056e..6af0bf9ab5c2c60048fa54d48a8ae944bcc7d41e 100644 (file)
@@ -1176,8 +1176,8 @@ void V8ISel::visitSetCondInst(SetCondInst &I) {
   case Instruction::SetGE: BranchIdx = 5; break;
   }
   unsigned Column = 0;
-  if (Ty->isSigned()) ++Column;
-  if (Ty->isFloatingPoint()) ++Column;
+  if (Ty->isSigned() && !Ty->isFloatingPoint()) Column = 1;
+  if (Ty->isFloatingPoint()) Column = 2;
   static unsigned OpcodeTab[3*6] = {
                                  // LLVM            SparcV8
                                  //        unsigned signed  fp