On 10/14/25 12:41 AM, Robin Dapp wrote:


What I remembered is that the multiple-set conversion also takes care of the
swap-idiom recognition which could also include zero/sign extensions.  We need
to make sure to not disturb that but I'm not sure we even have a test for that
right now.
Do you recall the target or benchmark that motivated that work?


Ideally we'd try all reasonable ifcvt approaches, cost them, and compare them
afterwards but...It's funny you mention that. I was looking at a seemingly unrelated
issue last week with the sign_bit_splat support. Even within just that code there's like 5 different sequences we'd like to cost out and select across in some cases. We do cost out the initial major decisions, but don't cost out some of the smaller decisions.

I guess we could just cost out all the various sequences, but that's going to generate a lot of dead RTL for the garbage collector to clean up. Probably not great from a compile-time standpoint either. Though I guess in both circumstances we're only doing this once we've decided sign-bit-splat based sequence is generally appropriate.

I'm still hoping to avoid having adjusting that code for an in-flight patch to remove the (and (not (reg) (const))) insn-and-split which is causing heartburn in various ways.

Jeff







Reply via email to