mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-03 14:31:10 +00:00
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
This commit is contained in:
parent
390564206f
commit
91053d585a
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user