diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-09-13 09:12:44 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-09-13 09:12:44 +0000 |
| commit | d816320809937e4e202e83e9e7b53d64b0521038 (patch) | |
| tree | 8dd03473a6b9ce10adfe6294b1f9f2f4d6816e13 /llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | |
| parent | 030c165710fb14345dff243bb75b6506f6d73dfb (diff) | |
| download | bcm5719-llvm-d816320809937e4e202e83e9e7b53d64b0521038.tar.gz bcm5719-llvm-d816320809937e4e202e83e9e7b53d64b0521038.zip | |
[SystemZ] Use getTarget{Insert,Extract}Subreg rather than getMachineNode
Just a clean-up, no behavioral change intended.
llvm-svn: 190673
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp index 9d71c3948d6..01f008a2d98 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp @@ -814,18 +814,11 @@ SDValue SystemZDAGToDAGISel::getUNDEF64(SDLoc DL) { } SDValue SystemZDAGToDAGISel::convertTo(SDLoc DL, EVT VT, SDValue N) { - if (N.getValueType() == MVT::i32 && VT == MVT::i64) { - SDValue Index = CurDAG->getTargetConstant(SystemZ::subreg_32bit, MVT::i64); - SDNode *Insert = CurDAG->getMachineNode(TargetOpcode::INSERT_SUBREG, - DL, VT, getUNDEF64(DL), N, Index); - return SDValue(Insert, 0); - } - if (N.getValueType() == MVT::i64 && VT == MVT::i32) { - SDValue Index = CurDAG->getTargetConstant(SystemZ::subreg_32bit, MVT::i64); - SDNode *Extract = CurDAG->getMachineNode(TargetOpcode::EXTRACT_SUBREG, - DL, VT, N, Index); - return SDValue(Extract, 0); - } + if (N.getValueType() == MVT::i32 && VT == MVT::i64) + return CurDAG->getTargetInsertSubreg(SystemZ::subreg_32bit, + DL, VT, getUNDEF64(DL), N); + if (N.getValueType() == MVT::i64 && VT == MVT::i32) + return CurDAG->getTargetExtractSubreg(SystemZ::subreg_32bit, DL, VT, N); assert(N.getValueType() == VT && "Unexpected value types"); return N; } |

