[AArch64][SVE] Add instcombine for PTEST_ANY(X=OP(PG,...), X) -> PTEST_ANY(PG, X))
authorCullen Rhodes <cullen.rhodes@arm.com>
Wed, 12 Oct 2022 08:36:03 +0000 (08:36 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Wed, 12 Oct 2022 09:14:08 +0000 (09:14 +0000)
commit388cacb341917964ee87b23c0af2990af9e66fe0
treebdf505ae961624f5b91803a08cc9dc96c87a0090
parent5b5756e6e31488f2cda2b15544b731b25e7899cf
[AArch64][SVE] Add instcombine for PTEST_ANY(X=OP(PG,...), X) -> PTEST_ANY(PG, X))

Given this is an OR reduction the two are equivalent and later
optimizations (AArch64InstrInfo::optimizePTestInstr) may rewrite the
sequence to use the flag-setting variant of instruction X, to remove the
PTEST altogether.

Reviewed By: paulwalker-arm, bsmith

Differential Revision: https://reviews.llvm.org/D134946
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Transforms/InstCombine/AArch64/sve-intrinsics-ptest.ll