aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-28 02:58:31 +0000
committerDan Gohman <gohman@apple.com>2009-01-28 02:58:31 +0000
commit34a8b45f9767286b0158f6a62c1d43777fc84287 (patch)
tree5adee67acaed806e8fc59200f473398684bcc5d8 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parent036e9041553d02fa602b979f8b7fedf4d644efe2 (diff)
downloadexternal_llvm-34a8b45f9767286b0158f6a62c1d43777fc84287.zip
external_llvm-34a8b45f9767286b0158f6a62c1d43777fc84287.tar.gz
external_llvm-34a8b45f9767286b0158f6a62c1d43777fc84287.tar.bz2
Use ZERO_EXTEND instead of ANY_EXTEND when promoting
shift amounts, to avoid implicitly assuming that target architectures will ignore the high bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63169 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 58ac8c2..4ee17bf 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -974,7 +974,7 @@ SDValue SelectionDAGLegalize::LegalizeShiftAmount(SDValue ShiftAmt) {
return DAG.getNode(ISD::TRUNCATE, TLI.getShiftAmountTy(), ShiftAmt);
if (TLI.getShiftAmountTy().bitsGT(ShiftAmt.getValueType()))
- return DAG.getNode(ISD::ANY_EXTEND, TLI.getShiftAmountTy(), ShiftAmt);
+ return DAG.getNode(ISD::ZERO_EXTEND, TLI.getShiftAmountTy(), ShiftAmt);
return ShiftAmt;
}