summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-29 01:25:06 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-29 01:25:06 +0000
commit58d1eacd80d5e4a97df27d9381f8010bbd2f0745 (patch)
treefa1dbddd31d477ec6a5d1650a7395130d9b77026 /llvm/lib
parent67799d4ffbd8955567e1317eb1fe69ba67a9adb7 (diff)
downloadbcm5719-llvm-58d1eacd80d5e4a97df27d9381f8010bbd2f0745.tar.gz
bcm5719-llvm-58d1eacd80d5e4a97df27d9381f8010bbd2f0745.zip
Prevent PPC::BCC first operand, the PRED number, from being isel'd into a LI instruction.
llvm-svn: 37790
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 35ab9de1134..730bac653a4 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -1080,7 +1080,10 @@ SDNode *PPCDAGToDAGISel::Select(SDOperand Op) {
// Op #2 is the CR#
// Op #3 is the Dest MBB
AddToISelQueue(N->getOperand(4)); // Op #4 is the Flag.
- SDOperand Ops[] = { N->getOperand(1), N->getOperand(2), N->getOperand(3),
+ // Prevent PPC::PRED_* from being selected into LI.
+ SDOperand Pred =
+ getI32Imm(cast<ConstantSDNode>(N->getOperand(1))->getValue());
+ SDOperand Ops[] = { Pred, N->getOperand(2), N->getOperand(3),
N->getOperand(0), N->getOperand(4) };
return CurDAG->SelectNodeTo(N, PPC::BCC, MVT::Other, Ops, 5);
}
OpenPOWER on IntegriCloud