mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-14 13:57:51 +00:00
Fix a couple of minor bugs. The first fixes povray, the second fixes things
if the dag combiner isn't run git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a158eee313
commit
3393e80a06
@ -898,8 +898,11 @@ SDOperand PPCDAGToDAGISel::Select(SDOperand Op) {
|
||||
Tmp = CurDAG->getTargetNode(PPC::ADDIS, MVT::i32, getGlobalBaseReg(),CPI);
|
||||
else
|
||||
Tmp = CurDAG->getTargetNode(PPC::LIS, MVT::i32, CPI);
|
||||
CurDAG->SelectNodeTo(N, PPC::LA, MVT::i32, Tmp, CPI);
|
||||
return SDOperand(N, 0);
|
||||
if (N->hasOneUse()) {
|
||||
CurDAG->SelectNodeTo(N, PPC::LA, MVT::i32, Tmp, CPI);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
return CurDAG->getTargetNode(PPC::LA, MVT::i32, Tmp, CPI);
|
||||
}
|
||||
case ISD::GlobalAddress: {
|
||||
GlobalValue *GV = cast<GlobalAddressSDNode>(N)->getGlobal();
|
||||
@ -1035,7 +1038,10 @@ SDOperand PPCDAGToDAGISel::Select(SDOperand Op) {
|
||||
unsigned SH, MB, ME;
|
||||
if (isRotateAndMask(N->getOperand(0).Val, Imm, false, SH, MB, ME)) {
|
||||
Val = Select(N->getOperand(0).getOperand(0));
|
||||
} else {
|
||||
} else if (Imm == 0) {
|
||||
// AND X, 0 -> 0, not "rlwinm 32".
|
||||
return Select(N->getOperand(1));
|
||||
} else {
|
||||
Val = Select(N->getOperand(0));
|
||||
isRunOfOnes(Imm, MB, ME);
|
||||
SH = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user