[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2023-06-07 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #13 from Andrew Macleod --- (In reply to Andrew Pinski from comment #12) > Aldy or Andrew, why in conv1 we don't get a range for > SR.4_4 = sD.8798._M_valueD.7665; > > Even though the range we have is [-1,1] according to the > __b

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2023-06-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Andrew Pinski changed: What|Removed |Added CC||aldyh at gcc dot gnu.org,

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2022-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #11 from Jakub Jelinek --- (In reply to Oliver Schönrock from comment #10) > I agree the switch optimisation is better, but... > > shouldn't std::bit_cast prevent incorrect casting with different underlying > implementaion? (ie if t

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2022-03-14 Thread oschonrock at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #10 from Oliver Schönrock --- I agree the switch optimisation is better, but... shouldn't std::bit_cast prevent incorrect casting with different underlying implementaion? (ie if the size doesn't match, and the size could be deduced

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2022-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #9

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2022-03-14 Thread oschonrock at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #8 from Oliver Schönrock --- how about: #include #include #include int conv3(std::strong_ordering s){ return std::bit_cast(s); } std::strong_ordering conv4(int i){ return std::bit_cast(static_cast(i)); } conv3(std::stro

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2021-08-03 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Martin Liška changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2021-08-03 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #6 from Martin Liška --- (In reply to Marc Glisse from comment #3) > I thought we had code to recognize a switch that represents a linear > function, I was hoping that it would kick in with your hoisting patch... Yep, we have the cod

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2021-08-03 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #5

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2021-06-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2020-04-13 00:00:00 |2021-6-14 --- Comment #4 from Andrew Pin

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2020-05-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Bug 94566 depends on bug 33315, which changed state. Bug 33315 Summary: stores not commoned by sinking https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315 What|Removed |Added -

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2020-04-15 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #3 from Marc Glisse --- I thought we had code to recognize a switch that represents a linear function, I was hoping that it would kick in with your hoisting patch...

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2020-04-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Richard Biener changed: What|Removed |Added Blocks|11832, 33315| Depends on|

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2020-04-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 --- Comment #1 from Richard Biener --- So for conv2 the most immediate issue is that we're failing to sink and common the assignment to D.8516._M_value (I had patches for this). conv2 (int i) { int i_2(D) = i; struct strong_ordering D.8516;

[Bug tree-optimization/94566] conversion between std::strong_ordering and int

2020-04-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|