diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2008-03-13 05:47:01 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2008-03-13 05:47:01 +0000 |
commit | 6634e26aa11b0e2eabde8b3b463bb943364f8d9d (patch) | |
tree | f6acb329d49272da4adec8fba66734bba41760b5 /lib/Target/X86/X86ISelDAGToDAG.cpp | |
parent | 3bdfa04cbe42106d2dc55d0dd980ba9e52a3bd84 (diff) | |
download | llvm-6634e26aa11b0e2eabde8b3b463bb943364f8d9d.tar.gz llvm-6634e26aa11b0e2eabde8b3b463bb943364f8d9d.tar.bz2 llvm-6634e26aa11b0e2eabde8b3b463bb943364f8d9d.tar.xz |
Get rid of a pseudo instruction and replace it with subreg based operation on real instructions, ridding the asm printers of the hack used to do this previously. In the process, update LowerSubregs to be careful about eliminating copies that have side affects.
Note: the coalescer will have to be careful about this too, when it starts coalescing insert_subreg nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index d5601b74ea..bf233bfcbb 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -1533,14 +1533,9 @@ SDNode *X86DAGToDAGISel::Select(SDOperand N) { AddToISelQueue(N0); if (NVT == MVT::i64 || NVT == MVT::i32 || NVT == MVT::i16) { SDOperand SRIdx; - SDOperand ImplVal = CurDAG->getTargetConstant(X86::IMPL_VAL_UNDEF, - MVT::i32); switch(N0.getValueType()) { case MVT::i32: SRIdx = CurDAG->getTargetConstant(X86::SUBREG_32BIT, MVT::i32); - // x86-64 zero extends 32-bit inserts int 64-bit registers - if (Subtarget->is64Bit()) - ImplVal = CurDAG->getTargetConstant(X86::IMPL_VAL_ZERO, MVT::i32); break; case MVT::i16: SRIdx = CurDAG->getTargetConstant(X86::SUBREG_16BIT, MVT::i32); @@ -1552,6 +1547,8 @@ SDNode *X86DAGToDAGISel::Select(SDOperand N) { default: assert(0 && "Unknown any_extend!"); } if (SRIdx.Val) { + SDOperand ImplVal = + CurDAG->getTargetConstant(X86InstrInfo::IMPL_VAL_UNDEF, MVT::i32); SDNode *ResNode = CurDAG->getTargetNode(X86::INSERT_SUBREG, NVT, ImplVal, N0, SRIdx); |