forked from OSchip/llvm-project
Fix a compile crash building MultiSource/Applications/d with the new front-end.
The PPC backend was generating random shift counts in this case, due to an uninitialized variable. llvm-svn: 25114
This commit is contained in:
parent
b5f210f3f2
commit
20c88dfd1b
|
@ -952,13 +952,13 @@ SDOperand PPCDAGToDAGISel::Select(SDOperand Op) {
|
||||||
if (isIntImmediate(N->getOperand(1), Imm) &&
|
if (isIntImmediate(N->getOperand(1), Imm) &&
|
||||||
N->getOperand(0).getOpcode() == ISD::OR &&
|
N->getOperand(0).getOpcode() == ISD::OR &&
|
||||||
isIntImmediate(N->getOperand(0).getOperand(1), Imm2)) {
|
isIntImmediate(N->getOperand(0).getOperand(1), Imm2)) {
|
||||||
unsigned SH, MB, ME;
|
unsigned MB, ME;
|
||||||
Imm = ~(Imm^Imm2);
|
Imm = ~(Imm^Imm2);
|
||||||
if (isRunOfOnes(Imm, MB, ME)) {
|
if (isRunOfOnes(Imm, MB, ME)) {
|
||||||
SDOperand Tmp1 = Select(N->getOperand(0).getOperand(0));
|
SDOperand Tmp1 = Select(N->getOperand(0).getOperand(0));
|
||||||
SDOperand Tmp2 = Select(N->getOperand(0).getOperand(1));
|
SDOperand Tmp2 = Select(N->getOperand(0).getOperand(1));
|
||||||
return CurDAG->getTargetNode(PPC::RLWIMI, MVT::i32, Tmp1, Tmp2,
|
return CurDAG->getTargetNode(PPC::RLWIMI, MVT::i32, Tmp1, Tmp2,
|
||||||
getI32Imm(SH), getI32Imm(MB), getI32Imm(ME));
|
getI32Imm(0), getI32Imm(MB), getI32Imm(ME));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue