[Bug tree-optimization/109112] [[assume(...)]] is not taken into account for structs

2023-07-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112 --- Comment #8 from Jakub Jelinek --- (In reply to Jason Merrill from comment #7) > Why don't the existing optimizations work on the artificial function the > same as any other function? i.e. like > > struct S { bool x; }; > void

[Bug tree-optimization/109112] [[assume(...)]] is not taken into account for structs

2023-07-13 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112 --- Comment #7 from Jason Merrill --- In an email thread Jakub wrote: Only the simplest assumptions in [[assume(cond)]] where there clearly aren't any side-effects no risks of them are lowered to if (!cond) __builtin_unreachable (); in the

[Bug tree-optimization/109112] [[assume(...)]] is not taken into account for structs

2023-07-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112 Jakub Jelinek changed: What|Removed |Added CC||jamborm at gcc dot gnu.org --- Comment

[Bug tree-optimization/109112] [[assume(...)]] is not taken into account for structs

2023-07-13 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org Last

[Bug tree-optimization/109112] [[assume(...)]] is not taken into account for structs

2023-03-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112 --- Comment #4 from Jakub Jelinek --- One way to improve this case would be to teach IPA SRA/CP etc. to perform some optimizations on the .ASSUME ifn calls and their corresponding functions, in this case if SRA would turn the argument from

[Bug tree-optimization/109112] [[assume(...)]] is not taken into account for structs

2023-03-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112 --- Comment #3 from Andrew Pinski --- I also suspect this is a dup of bug 109045 really.