[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 5 10:33:01 PST 2006



Changes in directory llvm/lib/Target/PowerPC:

PPCISelDAGToDAG.cpp updated: 1.147 -> 1.148
---
Log message:

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.


---
Diffs of the changes:  (+2 -2)

 PPCISelDAGToDAG.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.147 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.148
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.147	Fri Dec 23 19:00:15 2005
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp	Thu Jan  5 12:32:49 2006
@@ -952,13 +952,13 @@
     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));
       }
     }
     






More information about the llvm-commits mailing list