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 | 7c7b431d2fa3ead0a2a24c4dd81fc92f293203dd (patch) | |
tree | 1273466750ebfbd6aba2b038a6f5eef1ea362f6e /lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | |
parent | 856bf594338567a592086fe782f2f51650e4e294 (diff) | |
download | llvm-7c7b431d2fa3ead0a2a24c4dd81fc92f293203dd.tar.gz llvm-7c7b431d2fa3ead0a2a24c4dd81fc92f293203dd.tar.bz2 llvm-7c7b431d2fa3ead0a2a24c4dd81fc92f293203dd.tar.xz |
[SystemZ] Use getTarget{Insert,Extract}Subreg rather than getMachineNode
Just a clean-up, no behavioral change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp index 9d71c3948d..01f008a2d9 100644 --- a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp +++ b/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; } |