[AArch64][SVE] Sink ptrue into loop if it is used by PTEST.
authorSander de Smalen <sander.desmalen@arm.com>
Tue, 26 Jul 2022 13:46:17 +0000 (14:46 +0100)
committerSander de Smalen <sander.desmalen@arm.com>
Tue, 26 Jul 2022 14:07:41 +0000 (15:07 +0100)
commita41ddf178eac21ab259b48acb6d41e852ee4abaa
treee97a5a9a76954a3e7d0a86abce1bb8a16efa31e3
parent370ff43a15c90eca61dfa5715c7da82f1a4709f8
[AArch64][SVE] Sink ptrue into loop if it is used by PTEST.

This helps fold away the ptest instructions, which needs the knowledge on whether
the general predicate is known to zero the inactive lanes.

This fixes some PTEST regressions introduced by D129282.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D129852
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-ptest-removal-sink.ll [new file with mode: 0644]