This is the mail archive of the
mailing list for the GCC project.
Question about subregs on constants
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 27 Oct 2015 17:47:19 +0100
- Subject: Question about subregs on constants
- Authentication-results: sourceware.org; auth=none
what does speak against folding SUBREGs on constants in fold_rtx?
CSE does refuse to propagate constants into subreg expressions probably because fold_rtx does not
handle it - and in fact a subreg on a constant does not seem to be defined. I'm wondering why this
is the case? What's the problem with simplifying subregs on constants?
If there is a good reason not to fold things like:
(subreg:DI (const_int 1 [0x1]) 0)
What about simplifying?
(and:DI (subreg:DI (const_int 1 [0x1]) 0)
(const_int 63 [0x3f])))
May we take care of it in simplify_binary_operation perhaps?
I ran into these problems when trying to fix the shift patterns in the S/390 back end:
I see a few performance regressions with it due to missed optimizations.