On 14/09/2026 10:27, Tamar Christina wrote:
That means the IFNs fail the check in ssa_is_replaceable_p. This adds a promise
essentially that if you see the IFN in the IL then the producer has checked it
and
it's TER safe.
This then updates the vec_cbranch_* code to support the new COND_* IFNs.
Without
this we regress codegen to
cmpgt p1.s, p0/z, z0.s, z1.s
ptest p0, p1.b
b.ne .Lhit
and after this patch, branch expansion can see the compare IFN directly and pass
the original compare through the normal target compare-and-branch machinery:
cmpgt p1.s, p0/z, z0.s, z1.s
b.any .Lhit
Hi Tamar,
Sorry I don't understand the context for this change or what TER is really.
But I'm curious why we don't allow the former code gen and clean it up
in RTL combine in the backend?
Seems like it could be a general pattern and optimization?
KR,
Alfie
Tests for this are the existing vec_cbranch tests which fail.