[clang] [SVE][InstCombine] Delete redundante sel instructions with ptrue (PR #68463)
David Sherwood via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 10 01:56:49 PDT 2023
================
@@ -800,6 +800,13 @@ instCombineConvertFromSVBool(InstCombiner &IC, IntrinsicInst &II) {
static std::optional<Instruction *> instCombineSVESel(InstCombiner &IC,
IntrinsicInst &II) {
+ // svsel(ptrue, x, y) => x
+ auto *OpPredicate = II.getOperand(0);
----------------
david-arm wrote:
This looks like a valid optimisation, but it also suggests that the ACLE code written in C/C++ would benefit from being rewritten in a way that avoids this.
https://github.com/llvm/llvm-project/pull/68463
More information about the cfe-commits
mailing list