[PATCH] D116400: [LegalizeTypes][VP] Add integer promotion support for vp.select

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 3 08:02:42 PST 2022


simoll added a comment.

LGTM



================
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);
----------------
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`


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