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).
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
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 =
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` shows
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 opti
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 an
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).
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 r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88854
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
Status|