Re: [PATCH] Fix UB in store-merging or bswap opt (PR tree-optimization/87826)

2018-11-01 Thread Richard Biener
On November 1, 2018 10:14:13 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >When compiling code with UB shifts/rotates where the shift count is out >of >range constant, the store-merging and bswap opts will invoke UB in the >compiler too. >The following patch prevents that. > >Bootstrapped/regtested

[PATCH] Fix UB in store-merging or bswap opt (PR tree-optimization/87826)

2018-11-01 Thread Jakub Jelinek
Hi! When compiling code with UB shifts/rotates where the shift count is out of range constant, the store-merging and bswap opts will invoke UB in the compiler too. The following patch prevents that. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/8.x? 2018-11-01 Jakub Jeline