[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-27 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 Kewen Lin changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-27 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #13 from Kewen Lin --- Author: linkw Date: Thu Nov 28 06:34:31 2019 New Revision: 278800 URL: https://gcc.gnu.org/viewcvs?rev=278800=gcc=rev Log: [rs6000] Fix PR92566 by checking VECTOR_UNIT_NONE_P As Segher pointed out in PR92566,

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #12 from Kewen Lin --- FWIW, I did some statistics collection with regression testing on P8 machine, the #hits on early return is 516, while the other # is 1147412. So the conclusion is that early return is useless (at least for

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 Kewen Lin changed: What|Removed |Added Attachment #47325|0 |1 is obsolete|

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #10 from Kewen Lin --- Yes, you are right, it's fine to drop it. Since the previous code will early return if it's under (!TARGET_ALTIVEC && !TARGET_VSX), I was thinking it may be good to put an early return there. I'm fine to remove

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #9 from Segher Boessenkool --- Oh, and I think you can drop the if (!TARGET_ALTIVEC && !TARGET_VSX) thing? The rest of the code should handle that fine?

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #8 from Segher Boessenkool --- I don't think you need lines 4909..4911. How can we test this? Is there good test coverage for it already?

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 Kewen Lin changed: What|Removed |Added Attachment #47306|0 |1 is obsolete|

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-21 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #6 from Kewen Lin --- Great! I was thinking there whether exists some array to map from mode to vector, but missed this one. Good to know we have this kind of function!

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-20 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #5 from Segher Boessenkool --- The whole function can be something as simple as mode = mode_for_vector (mode, 16 / GET_MODE_SIZE (mode)); if (this is actually an existing mode && !VECTOR_UNIT_NONE (mode)) return mode;

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-19 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 Kewen Lin changed: What|Removed |Added Attachment #47295|0 |1 is obsolete|

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-19 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #3 from Segher Boessenkool --- It should do something like if (!VECTOR_UNIT_NONE_P (V2DImode)) return V2DImode; and similar for all existing entries. Putting the same conditionals in multiple places is prone to error, as

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-18 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 --- Comment #2 from Kewen Lin --- Created attachment 47295 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47295=edit Guard V2DImode and V1TImode under VSX and P8VECTOR

[Bug target/92566] rs6000_preferred_simd_mode isn't very good

2019-11-18 Thread linkw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92566 Kewen Lin changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|