[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2021-09-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #8 from Richard Biener --- After the fix for PR10112 we still need to handle the case to insert an additional hashtable entry when we found a value to CSE to (see comment #1).

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2021-08-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2019-01-15 00:00:00 |2021-8-9 Severity|normal

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread kretz at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #7 from Matthias Kretz --- (In reply to rguent...@suse.de from comment #5) > Yeah, we do not perform this kind of "flow-sensitive" TBAA. So > when trying to DSE *a = x; we only look at > > int x = *a; > *b = 1; > *a

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread kretz at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #6 from Matthias Kretz --- Regarding gcc.dg/tree-ssa/ssa-pre-30.c I'd argue that for `bar`, GCC may assume b == 0, because otherwise f would be read both via int and float pointer, which is UB. So bar can be optimized to `foo`

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #5 from rguenther at suse dot de --- On Tue, 15 Jan 2019, kretz at kde dot org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 > > --- Comment #4 from Matthias Kretz --- > Another test case, which the patch doesn't

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread kretz at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #4 from Matthias Kretz --- Another test case, which the patch doesn't optimize: short f(int *a, short *b) { short y = *b; // 1 int x = *a; // 2 *b = 1; *a = x; return y; } The loads in 1+2 are either UB or a

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #3 from Richard Biener --- Causes FAIL: gcc.dg/tree-ssa/ssa-pre-30.c scan-tree-dump-times pre "Replaced MEM" 2 the extra entry somehow confuses PRE (AVAIL compute I guess).

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 --- Comment #2 from Richard Biener --- GCC 5 doesn't see the CSE opportunity because it doesn't process the unused load and the translation code is not up-to-speed. Then DOM figures out the redundant store it sees them adjacent. So I wouldn't

[Bug tree-optimization/88854] redundant store after load that would makes aliasing UB

2019-01-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854 Richard Biener changed: What|Removed |Added Keywords||missed-optimization