[llvm-branch-commits] [llvm] [InstCombine][AMDGPU] Fold select of intrinsics differing in one operand (PR #227737)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 14 02:08:29 PDT 2026
================
@@ -544,6 +586,9 @@ Instruction *InstCombinerImpl::foldSelectIntrinsic(SelectInst &SI) {
return replaceInstUsesWith(SI, NewCall);
}
default:
+ if (isTriviallyVectorizable(IID))
+ return foldSelectIntoIntrinsicArg(SI, LHSIntrinsic, RHSIntrinsic,
+ Builder);
----------------
nikic wrote:
Should subsume the ctpop case above?
https://github.com/llvm/llvm-project/pull/227737
More information about the llvm-branch-commits
mailing list