Use SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's

implicit zero-extend.

llvm-svn: 86196
This commit is contained in:
Dan Gohman 2009-11-05 23:53:08 +00:00
parent 4c25ce723f
commit 006f9353e1
1 changed files with 3 additions and 5 deletions

View File

@ -1949,14 +1949,12 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
0);
// We just did a 32-bit clear, insert it into a 64-bit register to
// clear the whole 64-bit reg.
SDValue Undef =
SDValue(CurDAG->getMachineNode(TargetInstrInfo::IMPLICIT_DEF,
dl, MVT::i64), 0);
SDValue Zero = CurDAG->getTargetConstant(0, MVT::i64);
SDValue SubRegNo =
CurDAG->getTargetConstant(X86::SUBREG_32BIT, MVT::i32);
ClrNode =
SDValue(CurDAG->getMachineNode(TargetInstrInfo::INSERT_SUBREG, dl,
MVT::i64, Undef, ClrNode, SubRegNo),
SDValue(CurDAG->getMachineNode(TargetInstrInfo::SUBREG_TO_REG, dl,
MVT::i64, Zero, ClrNode, SubRegNo),
0);
} else {
ClrNode = SDValue(CurDAG->getMachineNode(ClrOpcode, dl, NVT), 0);