From 96aaa545298b6b95d5a83cc5b62af14ca8968ed4 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 12 Oct 2007 07:55:53 +0000 Subject: [PATCH] Flag MOV32to32_ with EXTRACT_SUBREG. They should not be scheduled apart. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42894 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelDAGToDAG.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index c6d3e6cdd71..853ac114dfe 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -1000,8 +1000,9 @@ SDNode *X86DAGToDAGISel::getTruncate(SDOperand N0, MVT::ValueType VT) { VT = MVT::i32; break; } - N0 = - SDOperand(CurDAG->getTargetNode(Opc, VT, N0), 0); + N0 = SDOperand(CurDAG->getTargetNode(Opc, VT, MVT::Flag, N0), 0); + return CurDAG->getTargetNode(X86::EXTRACT_SUBREG, + VT, N0, SRIdx, N0.getValue(1)); } break; case MVT::i16: @@ -1010,11 +1011,9 @@ SDNode *X86DAGToDAGISel::getTruncate(SDOperand N0, MVT::ValueType VT) { case MVT::i32: SRIdx = CurDAG->getTargetConstant(3, MVT::i32); // SubRegSet 3 break; - default: assert(0 && "Unknown truncate!"); + default: assert(0 && "Unknown truncate!"); break; } - return CurDAG->getTargetNode(X86::EXTRACT_SUBREG, - VT, - N0, SRIdx); + return CurDAG->getTargetNode(X86::EXTRACT_SUBREG, VT, N0, SRIdx); } @@ -1382,7 +1381,8 @@ SDNode *X86DAGToDAGISel::Select(SDOperand N) { default: assert(0 && "Unknown any_extend!"); } if (SRIdx.Val) { - SDNode *ResNode = CurDAG->getTargetNode(X86::INSERT_SUBREG, NVT, N0, SRIdx); + SDNode *ResNode = CurDAG->getTargetNode(X86::INSERT_SUBREG, + NVT, N0, SRIdx); #ifndef NDEBUG DOUT << std::string(Indent-2, ' ') << "=> "; -- 2.34.1