[PATCH] PR target/85358 patch v2: Add target hook to prevent default widening

Michael Meissner meissner@linux.ibm.com
Tue May 29 18:19:00 GMT 2018


On Sat, May 26, 2018 at 08:13:04AM +0200, Richard Biener wrote:
> On May 25, 2018 8:49:47 PM GMT+02:00, Michael Meissner <meissner@linux.ibm.com> wrote:
> >I redid the patch to make the target hook only apply for scalar float
> >points,
> >and I removed all of the integer only subcases.
> >
> >I have checked this on a little endian Power8 system, and verified that
> >it
> >bootstraps correctly and there are no regressions.  I have just started
> >an
> >x86_64 build.  Assuming that build has no regressions, can I check this
> >into
> >GCC 9?  This bug appears in GCC 8, and I would like to back port this
> >patch to
> >GCC 8 as well before GCC 8.2 goes out.
> 
> What happens if you hack genmodes to not claim IFmode has any wider relationship with other modes? 

It breaks the initialization of all of the types that initializes each of the
types from smallest to widest using the wider tables.

So you either need to have special types that are initialized without using the
wider table, or you need two sets of wider tables, one used by the
initialization sequences, and the other by normal binop/unop expansion.

There may be other dependencies that I'm not aware of (such as it must be
within the MIN_MODE_FLOAT and MAX_MODE_FLOAT range).

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797



More information about the Gcc-patches mailing list