[PATCH] D123112: [VP] Legalize the stride operand for EXPERIMENTAL_VP_STRIDED SDNodes
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 02:30:00 PDT 2022
frasercrmck added a comment.
Looks good to me but I'd defer to @craig.topper in case I've missed something.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2242
+SDValue DAGTypeLegalizer::PromoteIntOp_VP_STRIDED(SDNode *N, unsigned OpNo) {
+ if (N->getOpcode() == ISD::EXPERIMENTAL_VP_STRIDED_LOAD)
+ assert(OpNo == 3 && "Unexpected operand for promotion");
----------------
Would this be at all nicer if it was a single `assert`? `assert((opc == load && opno == 3) || (opno == store && opno == 4))`? Having explicit if/else just filled with asserts is a little odd to me.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123112/new/
https://reviews.llvm.org/D123112
More information about the llvm-commits
mailing list