Fix CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll, and PR1473.

llvm-svn: 37362
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 0ce8b3f..30ada12 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -587,7 +587,7 @@
           }          
           
           SDOperand NewSA = 
-            TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(1).getValueType());
+            TLO.DAG.getConstant(Diff, Op.getOperand(1).getValueType());
           MVT::ValueType VT = Op.getValueType();
           return TLO.CombineTo(Op, TLO.DAG.getNode(Opc, VT,
                                                    InOp.getOperand(0), NewSA));