Re: [PATCH] Fix postreload constant merging (PR target/84899)

2018-03-16 Thread Jeff Law
On 03/16/2018 02:17 PM, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs on powerpc-linux, because we merge > SImode constants 0x7fff and 1 into 0x8000, which is not valid SImode > CONST_INT - -0x8000 is. Fixed by calling trunc_int_for_mode, and to > avoid UB in the compiler

[PATCH] Fix postreload constant merging (PR target/84899)

2018-03-16 Thread Jakub Jelinek
Hi! The following testcase ICEs on powerpc-linux, because we merge SImode constants 0x7fff and 1 into 0x8000, which is not valid SImode CONST_INT - -0x8000 is. Fixed by calling trunc_int_for_mode, and to avoid UB in the compiler do the addition in unsigned type. Bootstrapped/regteste