[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)
Paul Walker via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 07:27:12 PDT 2025
================
@@ -2641,6 +2641,20 @@ static std::optional<Instruction *> instCombineDMB(InstCombiner &IC,
return std::nullopt;
}
+static std::optional<Instruction *> instCombinePTrue(InstCombiner &IC,
+ IntrinsicInst &II) {
+ IRBuilder<> Builder(&II);
+ auto Type = cast<VectorType>(II.getType());
+ ConstantInt *Pattern;
+ if (match(II.getOperand(0), m_ConstantInt(Pattern)) &&
+ Pattern->getZExtValue() == AArch64SVEPredPattern::all) {
----------------
paulwalker-arm wrote:
```suggestion
if (match(II.getOperand(0), m_ConstantInt<AArch64SVEPredPattern::all>()) {
```
Not sure but I think this should works.
https://github.com/llvm/llvm-project/pull/135016
More information about the cfe-commits
mailing list