[PATCH] D109377: Integer type legalization for vp_load and vp_store.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 11:07:29 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1924
+ SDValue PromotedOperand = OpNo == 4 ? PromoteTargetBoolean(Operand, DataVT)
+ : GetPromotedInteger(Operand);
+ SmallVector<SDValue, 5> NewOps(N->op_begin(), N->op_end());
----------------
GetPromotedInteger -> ZExtPromotedInteger. We need to force the upper bits to 0.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1925
+ : GetPromotedInteger(Operand);
+ SmallVector<SDValue, 5> NewOps(N->op_begin(), N->op_end());
+ NewOps[OpNo] = PromotedOperand;
----------------
5 -> 6 if I've counted the number of operands correctly.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1933
+
+ return DAG.getTruncStoreVP(N->getChain(), SDLoc(N), DataOp, N->getBasePtr(),
+ N->getMask(), N->getVectorLength(),
----------------
Should we assert that the store isn't indexed since this call would be incorrect if it was?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1944
+ SDValue PromotedOperand = OpNo == 3 ? PromoteTargetBoolean(Operand, DataVT)
+ : GetPromotedInteger(Operand);
+ SmallVector<SDValue, 5> NewOps(N->op_begin(), N->op_end());
----------------
GetPromotedInteger -> ZExtPromotedInteger.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109377/new/
https://reviews.llvm.org/D109377
More information about the llvm-commits
mailing list