summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-19 22:31:21 +0000
committerChris Lattner <sabre@nondot.org>2005-01-19 22:31:21 +0000
commit96c26751ec4e348e3bbff1f9d317c39f3f4aa255 (patch)
tree291e602f04d37d21b1571fd8beecbee378627d3e /llvm/lib
parent411336fe0482a3fc10b97369a52ea552eff7d66d (diff)
downloadbcm5719-llvm-96c26751ec4e348e3bbff1f9d317c39f3f4aa255.tar.gz
bcm5719-llvm-96c26751ec4e348e3bbff1f9d317c39f3f4aa255.zip
Support targets that do not use i8 shift amounts.
llvm-svn: 19707
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index a17caa1469a..3439249446e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -450,6 +450,10 @@ void SelectionDAGLowering::visitBr(BranchInst &I) {
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));
}
OpenPOWER on IntegriCloud