On 08/02/2016 06:46 PM, Segher Boessenkool wrote:
On Tue, Aug 02, 2016 at 09:21:34AM -0600, Jeff Law wrote:
However I think there are more paradoxical subregs generated all over,
but the aarch64 insv code pattern did trigger more hidden bugs than
any other port.  It is certainly unfortunate that the major source
of paradoxical subreg is in a target-dependent code path :(

It is certainly unfortunate that paradoxical subregs exist at all!  :-)
Yea.  It probably seemed like a good idea 25-30 years ago, but I always
cringe when I see them being used.  Yea it gives the compiler some more
freedom, but more often than not I think we'd be better off with real
extensions.

And then perhaps have some bits marked as "do not care", perhaps using
a register note...  This would help other cases as well.

I'm thinking maybe an any_extend code to go along with sign_extend and zero_extend. If input and output registers are the same it would be treated like a no-op move. That might be close enough to get us the benefits of a paradoxical subreg.


Bernd

Reply via email to