diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-17 02:24:21 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-17 02:24:21 +0000 |
commit | 91053d585abf6b20b770532d007a8b7648d0621f (patch) | |
tree | b007b799e98bb7fc7782e447bb63f807626b6698 /lib | |
parent | 390564206f67b742ad7cbee1cf17ae52efa77cb6 (diff) | |
download | external_llvm-91053d585abf6b20b770532d007a8b7648d0621f.zip external_llvm-91053d585abf6b20b770532d007a8b7648d0621f.tar.gz external_llvm-91053d585abf6b20b770532d007a8b7648d0621f.tar.bz2 |
Use getZExtOrTrunc instead of repeating the same logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 10852bf..763edb3 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1394,11 +1394,7 @@ SDValue SelectionDAGLegalize::ExpandExtractFromVectorThroughStack(SDValue Op) { Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx, DAG.getConstant(EltSize, Idx.getValueType())); - if (Idx.getValueType().bitsGT(TLI.getPointerTy())) - Idx = DAG.getNode(ISD::TRUNCATE, dl, TLI.getPointerTy(), Idx); - else - Idx = DAG.getNode(ISD::ZERO_EXTEND, dl, TLI.getPointerTy(), Idx); - + Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy()); StackPtr = DAG.getNode(ISD::ADD, dl, Idx.getValueType(), Idx, StackPtr); if (Op.getValueType().isVector()) |