[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2022-06-16 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 HaoChen Gui changed: What|Removed |Added Status|NEW |RESOLVED Assignee|unassigned at

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2022-06-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #17 from CVS Commits --- The master branch has been updated by HaoChen Gui : https://gcc.gnu.org/g:8d1c6e7038b0c281ac2678f2f615806a7aac9174 commit r13-1131-g8d1c6e7038b0c281ac2678f2f615806a7aac9174 Author: Haochen Gui Date: Mon

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2022-03-07 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #16 from Segher Boessenkool --- There are many patterns that use VEC_I, and not all have a V1TI variant currently, so adding V1TI to it is not suitable for now. It is better to add a new iterator for now. This whole thing desperate

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2022-03-06 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 HaoChen Gui changed: What|Removed |Added CC||guihaoc at gcc dot gnu.org --- Comment #1

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #14 from Bill Schmidt --- (In reply to Segher Boessenkool from comment #13) > (In reply to Bill Schmidt from comment #11) > > As I mentioned privately, we could do with an audit of our implementation of > > standard patterns in gener

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #13 from Segher Boessenkool --- (In reply to Bill Schmidt from comment #11) > As I mentioned privately, we could do with an audit of our implementation of > standard patterns in general, since we tend to find such missing cases more

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #12 from Segher Boessenkool --- When is the lowering done currently? Only for the ops that have no other way of doing, and things are merged back to an __int128 immediately after that? If that is what is going on, then that is unfo

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #11 from Bill Schmidt --- As I mentioned privately, we could do with an audit of our implementation of standard patterns in general, since we tend to find such missing cases more often than I'd like...

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #10 from Bill Schmidt --- FWIW, I think the vector lowering pass is reasonable. These things always look horrible in isolation, but the lowering allows more optimization when the target doesn't really support the data type. This is

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #9 from Segher Boessenkool --- (In reply to Richard Biener from comment #7) > > I still think it would be best if Gimple did *never* split data. It > > simply does not know enough about the machine and what the eventual > > machine

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #8 from Segher Boessenkool --- Btw: > mfvsrd 9,34 > mfvsrld 8,34 > mfvsrd 11,35 > mfvsrld 10,35 > li 7,1 > cmpd 0,9,11 > bgt 0,.L2 > cmpld 0,9,11 > beq 0,.L5 > .L3: > li 7,

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #7 from Richard Biener --- (In reply to Segher Boessenkool from comment #6) > Ah, now I see. Thanks! > > Power10 has some new 128-bit insns (and p9 and p8 did before, too). > > I still think it would be best if Gimple did *never*

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #6 from Segher Boessenkool --- Ah, now I see. Thanks! Power10 has some new 128-bit insns (and p9 and p8 did before, too). I still think it would be best if Gimple did *never* split data. It simply does not know enough about the m

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #5 from Bill Schmidt --- At first glance, this is probably because vector.md's definition of vec_cmp isn't defined for V1TImode. Probably needs to be changed to use VEC_IP rather than VEC_I and implement all the cases for 128-bit.

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #4 from Bill Schmidt --- Above was compiled with -O2 -mcpu=power10.

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #3 from Bill Schmidt --- Sure. Consider: #include vector bool __int128 foo (vector signed __int128 a, vector signed __int128 b) { return vec_cmpgt (a, b); } With gimple folding we emulate in 64-bit mode: mfvsrd 9,34

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-19 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 --- Comment #2 from Segher Boessenkool --- Do you maybe have some simple example (of what we generate, and what you say it should be)?

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 Richard Biener changed: What|Removed |Added Target Milestone|12.0|---

[Bug target/103316] PowerPC: Gimple folding of int128 comparisons produces suboptimal code

2021-11-18 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103316 Bill Schmidt changed: What|Removed |Added Keywords||missed-optimization Status|U