[llvm] [InstCombine] Implement vp.reverse elimination through binop/unop (PR #143963)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 12 20:39:00 PDT 2025
================
@@ -3582,6 +3582,42 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
}
break;
}
+ case Intrinsic::experimental_vp_reverse: {
+ Value *BO0, *BO1, *X, *Y;
+ Value *Vec = II->getArgOperand(0);
+ Value *Mask = II->getArgOperand(1);
+ Value *EVL = II->getArgOperand(2);
+ auto m_VPReverse = [&](Value *&Vec) {
+ return m_Intrinsic<Intrinsic::experimental_vp_reverse>(
+ m_Value(Vec), m_Specific(Mask), m_Specific(EVL));
----------------
preames wrote:
You're 100% right. The case I actually care about is a true mask, so I'm going to restrict it to that.
https://github.com/llvm/llvm-project/pull/143963
More information about the llvm-commits
mailing list