diff options
author | Duncan Sands <baldrick@free.fr> | 2011-03-04 14:28:59 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2011-03-04 14:28:59 +0000 |
commit | 6bd1044222f9db8176378bb5cf2c1d1fc393812b (patch) | |
tree | e3193530b3da7ec26c0f490f1e57275ad63c59a3 /llvm/lib/CodeGen | |
parent | a0935267dce7c3e94838bf52e7a56eb4e196ac30 (diff) | |
download | bcm5719-llvm-6bd1044222f9db8176378bb5cf2c1d1fc393812b.tar.gz bcm5719-llvm-6bd1044222f9db8176378bb5cf2c1d1fc393812b.zip |
Revert commit 126684 "Use the correct shift amount type". It is only the correct
type after type legalization has completed. Before then it may simply not be big
enough to hold the shift amount, particularly on x86 which uses a very small type
for shifts (this issue broke stuff in the past which is why LegalizeTypes carefully
uses a large type for shift amounts).
llvm-svn: 127000
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index 0f7359d832a..935aab0e59a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -226,7 +226,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_BSWAP(SDNode *N) { unsigned DiffBits = NVT.getSizeInBits() - OVT.getSizeInBits(); return DAG.getNode(ISD::SRL, dl, NVT, DAG.getNode(ISD::BSWAP, dl, NVT, Op), - DAG.getConstant(DiffBits, TLI.getShiftAmountTy(NVT))); + DAG.getConstant(DiffBits, TLI.getPointerTy())); } SDValue DAGTypeLegalizer::PromoteIntRes_BUILD_PAIR(SDNode *N) { |