]> granicus.if.org Git - llvm/commitdiff
[X86] Connect the flags user from PCMPISTR instructions to the correct node from...
authorCraig Topper <craig.topper@intel.com>
Thu, 12 Jul 2018 18:04:05 +0000 (18:04 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 12 Jul 2018 18:04:05 +0000 (18:04 +0000)
We were accidentally connecting it to result 0 instead of result 1. This was caught by the machine verifier that noticed the flags were dead, but we were using them somehow. I'm still not clear what actually happened downstream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336925 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index 4ebb50d98172b1556709a7f379cf83a0d880bc29..f42e626a9c907136033c766cdfaf2aa541535a42 100644 (file)
@@ -3336,7 +3336,7 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
     }
 
     // Connect the flag usage to the last instruction created.
-    ReplaceUses(SDValue(Node, 2), SDValue(CNode, 0));
+    ReplaceUses(SDValue(Node, 2), SDValue(CNode, 1));
     CurDAG->RemoveDeadNode(Node);
     return;
   }