[Bug target/99639] Duplicated constant in V2SI/V4SI

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 18 09:48:35 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99639

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Actually
typedef int V __attribute__((vector_size (16)));
typedef int W __attribute__((vector_size (32)));

V f1 (void) { return (V) { 1, 2, 3, 4 }; }
W f2 (void) { return (W) { 1, 2, 3, 4, 5, 6, 7, 8 }; }
W f3 (void) { return (W) { 9, 8, 7, 6, 5, 4, 3, 2 }; }
V f4 (void) { return (V) { 9, 8, 7, 6 }; }
V f5 (void) { return (V) { 11, 12, 13, 14 }; }
W f6 (void) { return (W) { 7, 8, 9, 10, 11, 12, 13, 14 }; }
W f7 (void) { return (W) { 19, 18, 17, 16, 15, 14, 13, 12 }; }
V f8 (void) { return (V) { 15, 14, 13, 12 }; }
with -mavx2 -O2 proves I don't remember well, we optimize all of that.
But that is constant pool, and Andrew is talking about CSE of a register that
contains a larger vector containing the smaller vector as part of that, right?


More information about the Gcc-bugs mailing list