Codegen of added testcase before this patch:
ptrue p0.s cmpgt p1.s, p0/z, z0.s, z1.s cmpge p2.s, p0/z, z2.s, z1.s and p0.b, p0/z, p1.b, p2.b ret
Patterns originally authored by Will Lovett.
Differential D116749
[AArch64][SVE] Fold predicate into compare c-rhodes on Jan 6 2022, 8:12 AM. Authored by
Details Codegen of added testcase before this patch: ptrue p0.s cmpgt p1.s, p0/z, z0.s, z1.s cmpge p2.s, p0/z, z2.s, z1.s and p0.b, p0/z, p1.b, p2.b ret Patterns originally authored by Will Lovett.
Diff Detail
Event TimelineComment Actions Nice improvement @c-rhodes! Just a couple of suggestions ...
|
I do wonder if it's also worth creating patterns for ands matching the first operand too, i.e.
I'm thinking about the case where only one input to the and instruction is a setcc, i.e. see my comment about writing other test cases below.