diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-06-29 01:25:06 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-06-29 01:25:06 +0000 |
commit | 2bda17c92229e7116adf2edd3eea98c0a12f43cb (patch) | |
tree | fe912e850179aa5aa6a2a3d9bc4ef3228c46f5f7 /lib | |
parent | ca6c31cc419302514335e63ab927657f047516bf (diff) | |
download | external_llvm-2bda17c92229e7116adf2edd3eea98c0a12f43cb.zip external_llvm-2bda17c92229e7116adf2edd3eea98c0a12f43cb.tar.gz external_llvm-2bda17c92229e7116adf2edd3eea98c0a12f43cb.tar.bz2 |
Prevent PPC::BCC first operand, the PRED number, from being isel'd into a LI instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 35ab9de..730bac6 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/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); } |