[clang] [SVE][InstCombine] Delete redundante sel instructions with ptrue (PR #68463)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 10 05:20:56 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);
----------------
vfdff wrote:

Yes, you are right. Writing more efficient code is another way to optimize.

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


More information about the cfe-commits mailing list