From e3a92755ac6c9d78e7fc858fb88c5f9c84f89e5d Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 12 Jul 2018 18:04:05 +0000 Subject: [PATCH] [X86] Connect the flags user from PCMPISTR instructions to the correct node from the instruction. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 4ebb50d9817..f42e626a9c9 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -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; } -- 2.11.0