[PATCH] D116400: [LegalizeTypes][VP] Add integer promotion support for vp.select
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 3 22:20:02 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:241
+ case ISD::VP_SELECT:
+ Res = PromoteIntRes_SELECT(N, /*IsVP*/ true);
+ break;
----------------
Could check the opcode inside the function and have all 3 opcodes checked in the same place in the switch?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1136
-SDValue DAGTypeLegalizer::PromoteIntRes_SELECT(SDNode *N) {
- SDValue LHS = GetPromotedInteger(N->getOperand(1));
- SDValue RHS = GetPromotedInteger(N->getOperand(2));
- return DAG.getSelect(SDLoc(N),
- LHS.getValueType(), N->getOperand(0), LHS, RHS);
-}
-
-SDValue DAGTypeLegalizer::PromoteIntRes_VSELECT(SDNode *N) {
+SDValue DAGTypeLegalizer::PromoteIntRes_SELECT(SDNode *N, bool IsVP) {
SDValue Mask = N->getOperand(0);
----------------
simoll wrote:
> frasercrmck wrote:
> > nit: maybe we should rename this function as it suggests it only handles (upper-case) `ISD::SELECT` rather than the family of selects. `PromoteIntRes_Select`? I dunno if that's a great name but `SELECT` is misleading.
> +1 for `PromoteIntRes_Select`
+1 for PromoteIntRes_Select
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116400/new/
https://reviews.llvm.org/D116400
More information about the llvm-commits
mailing list