summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-13 15:14:03 +0000
committerDan Gohman <gohman@apple.com>2009-04-13 15:14:03 +0000
commit092b8b6fdb36700f07b3097c13090ee99583a401 (patch)
treea65d50db9591a176730c26f4ff63e3902ed7aa89
parentc5c2fc45aeefe96ef6326064163d197ad18a232d (diff)
downloadbcm5719-llvm-092b8b6fdb36700f07b3097c13090ee99583a401.tar.gz
bcm5719-llvm-092b8b6fdb36700f07b3097c13090ee99583a401.zip
Use X86::SUBREG_8BIT instead of hard-coding the equivalent constant.
llvm-svn: 68951
-rw-r--r--llvm/lib/Target/X86/X86ISelDAGToDAG.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 339261f9838..06b801f62f9 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -1298,7 +1298,7 @@ static SDNode *FindCallStartFromCall(SDNode *Node) {
SDNode *X86DAGToDAGISel::getTruncateTo8Bit(SDValue N0) {
assert(!Subtarget->is64Bit() &&
"getTruncateTo8Bit is only needed on x86-32!");
- SDValue SRIdx = CurDAG->getTargetConstant(1, MVT::i32); // SubRegSet 1
+ SDValue SRIdx = CurDAG->getTargetConstant(X86::SUBREG_8BIT, MVT::i32);
DebugLoc dl = N0.getDebugLoc();
// Ensure that the source register has an 8-bit subreg on 32-bit targets
@@ -1463,7 +1463,7 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
Result,
CurDAG->getTargetConstant(8, MVT::i8)), 0);
// Then truncate it down to i8.
- SDValue SRIdx = CurDAG->getTargetConstant(1, MVT::i32); // SubRegSet 1
+ SDValue SRIdx = CurDAG->getTargetConstant(X86::SUBREG_8BIT, MVT::i32);
Result = SDValue(CurDAG->getTargetNode(X86::EXTRACT_SUBREG, dl,
MVT::i8, Result, SRIdx), 0);
} else {
@@ -1616,7 +1616,7 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
CurDAG->getTargetConstant(8, MVT::i8)),
0);
// Then truncate it down to i8.
- SDValue SRIdx = CurDAG->getTargetConstant(1, MVT::i32); // SubRegSet 1
+ SDValue SRIdx = CurDAG->getTargetConstant(X86::SUBREG_8BIT, MVT::i32);
Result = SDValue(CurDAG->getTargetNode(X86::EXTRACT_SUBREG, dl,
MVT::i8, Result, SRIdx), 0);
} else {
OpenPOWER on IntegriCloud