From c9a5ef524a9f461717bbf647b2d3da061aed720d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 5 Jan 2006 18:32:49 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25114 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 47f73abebf2..dc858d49477 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -952,13 +952,13 @@ SDOperand PPCDAGToDAGISel::Select(SDOperand Op) { if (isIntImmediate(N->getOperand(1), Imm) && N->getOperand(0).getOpcode() == ISD::OR && isIntImmediate(N->getOperand(0).getOperand(1), Imm2)) { - unsigned SH, MB, ME; + unsigned MB, ME; Imm = ~(Imm^Imm2); if (isRunOfOnes(Imm, MB, ME)) { SDOperand Tmp1 = Select(N->getOperand(0).getOperand(0)); SDOperand Tmp2 = Select(N->getOperand(0).getOperand(1)); return CurDAG->getTargetNode(PPC::RLWIMI, MVT::i32, Tmp1, Tmp2, - getI32Imm(SH), getI32Imm(MB), getI32Imm(ME)); + getI32Imm(0), getI32Imm(MB), getI32Imm(ME)); } }