[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jan 19 14:31:36 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.27 -> 1.28
---
Log message:
Support targets that do not use i8 shift amounts.
---
Diffs of the changes: (+4 -0)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.27 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.28
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.27 Tue Jan 18 11:54:55 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jan 19 16:31:21 2005
@@ -450,6 +450,10 @@
void SelectionDAGLowering::visitBinary(User &I, unsigned Opcode) {
SDOperand Op1 = getValue(I.getOperand(0));
SDOperand Op2 = getValue(I.getOperand(1));
+
+ if (isa<ShiftInst>(I))
+ Op2 = DAG.getNode(ISD::ZERO_EXTEND, TLI.getShiftAmountTy(), Op2);
+
setValue(&I, DAG.getNode(Opcode, Op1.getValueType(), Op1, Op2));
}
More information about the llvm-commits
mailing list