This covers forms involving "CPY (immediate, zeroing)".
This doesn't handle the case where the operands are reversed, and the condition is freely invertible. Not sure how to handle that. Maybe a DAGCombine.
Differential D79598
[AArch64][SVE] Add patterns for VSELECT of immediates. efriedma on May 7 2020, 2:08 PM. Authored by
Details This covers forms involving "CPY (immediate, zeroing)". This doesn't handle the case where the operands are reversed, and the condition is freely invertible. Not sure how to handle that. Maybe a DAGCombine.
Diff Detail
Event TimelineComment Actions Hi @efriedma , thanks you for working on this.
Do you mean cases like select <vscale x 2 x i1> %p, <vscale x 2 x i64> zeroinitializer, <vscale x 2 x i64> %three? If that the case, the "merging" version of CPY , where %three is allocated to the dest register, should do it? CPY <Zd>.<T>, <Pg>/M, <R><n|SP>. Kind regards, Francesco
Comment Actions
I was more specifically thinking of the case where %p is something like an icmp, where we can potentially rewrite the operation to produce an inverted result for free. Otherwise, yes, we can use merging CPY. Comment Actions
I am not sure I understand. Can you give an explicit example? Regards, Francesco
Comment Actions Say you have something like x < 0 ? 0 : 1. That doesn't match. But if you rewrite it to x >= 0 ? 1 : 0, it does.
Comment Actions LGTM
A combine is probably easiest as it avoids having to specify the sequence to negate the predicate.
|
Can I assume this was already handled by the PredicateMethod of SVECpyImmOperand8?