[Bug rtl-optimization/113106] Missing CSE with cast to volatile

2023-12-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113106 --- Comment #8 from Andrew Pinski --- (In reply to Uroš Bizjak from comment #1) > Perhaps related, > > --cut here-- > int a; > > int foo(void) > { > return *(volatile int *) + *(volatile int *) > } > --cut here-- > > compiles with -O2

[Bug rtl-optimization/113106] Missing CSE with cast to volatile

2023-12-21 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113106 --- Comment #7 from Uroš Bizjak --- (In reply to Richard Biener from comment #6) > > BTW: I also checked with clang, and it creates expected code in all cases. > > But you don't get > >movl%gs:b(%rip), %eax >addl%eax,

[Bug rtl-optimization/113106] Missing CSE with cast to volatile

2023-12-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113106 Richard Biener changed: What|Removed |Added Component|c |rtl-optimization Ever confirmed|0