[llvm] [RISCV] Lower VP_SELECT constant false to use vmerge.vxm/vmerge.vim (PR #144461)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 09:14:19 PDT 2025


================
@@ -8170,11 +8170,17 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
     return lowerRESET_FPENV(Op, DAG);
   case ISD::EH_DWARF_CFA:
     return lowerEH_DWARF_CFA(Op, DAG);
+  case ISD::VP_SELECT:
+    if (SDValue Op2 = Op.getOperand(2);
----------------
preames wrote:

Have you tried doing this as a pre-lowering combine instead?  I could see that triggering other interactions, but it would address the missing fold problem Craig notes below.  

https://github.com/llvm/llvm-project/pull/144461


More information about the llvm-commits mailing list