[AArch64][SVE] Fix bad PTEST(PTRUE_ALL, PTEST_LIKE) optimization
AArch64InstrInfo::optimizePTestInstr attempts to remove a PTEST of a predicate generating operation that identically sets flags (implictly). When the mask is an all active of matching element size the PTEST is currently removed. For while instructions this is correct since they perform an implicit PTEST with an all active mask. However, for other instructions such as compares the mask could be different. This patch fixes this bug by only removing the PTEST if the same all active mask is used by the predicating-generating instruction. Reviewed By: bsmith Differential Revision: https://reviews.llvm.org/D137718
Loading
Please sign in to comment