diff options
| author | Dan Gohman <gohman@apple.com> | 2009-01-28 02:58:31 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-01-28 02:58:31 +0000 |
| commit | 77f7a5771e01ec5ec5fdbb3af8fcc2ce31e1d4f7 (patch) | |
| tree | 5adee67acaed806e8fc59200f473398684bcc5d8 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
| parent | 42ce8eaa8c5af9c29825737ce337e6e2397ab6a6 (diff) | |
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 58ac8c285c..4ee17bf807 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; } |
