[Bug target/107757] PPCLE: Inefficient vector constant creation

2024-08-16 Thread meissner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107757 --- Comment #4 from Michael Meissner --- Note, this code only shows up when the target CPU is power8. For the following code: vector long long lsb64() { return vec_splats(1LL); } Both power9 and power10 generate: xxspltib 34,1

[Bug target/107757] PPCLE: Inefficient vector constant creation

2024-08-12 Thread meissner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107757 --- Comment #3 from Michael Meissner --- As Segher says, the test is not quite correct. I would write it as: vector long long lsb64_opt() { vector long long a = vec_splats(~0LL); __asm__("vsrd %0,%1,%2":"=v"(a):"v"(a),"v"(a)); return

[Bug target/107757] PPCLE: Inefficient vector constant creation

2024-08-02 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107757 --- Comment #2 from Jiu Fu Guo --- For the scenario of this PR, the 2insn sequence would be faster than non-prefixed loading. One finding may be useful: when building 64bit constants, I notice that loading may be faster sometimes if the constan

[Bug target/107757] PPCLE: Inefficient vector constant creation

2024-07-31 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107757 Segher Boessenkool changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|