https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71805
Michael Meissner <meissner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-07-11 Ever confirmed|0 |1 --- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> --- Note, you need the option '--param tree-reassoc-width=1' to make this test fail. It does not fail if you use '--param tree-reassoc-width=2'. You do not need -flto to make the test fail. The simplest set of switches to make it fail is: -O3 -mcpu=power9 --param tree-reassoc-width=1 Now, looking at the code, if you use an reassociation width other than 1, the code generates NO Altivec, VSX, power8/power9 instructions. It just generates simple PowerPC code. If the reassociation width is 1, the compiler decides to vectorize the code. If I change the compiler to only use vperm and vpermr and not xxperm/xxpermr, the code runs fine. We probably need to validate that the simulator is executing xxperm correctly, and/or the compiler is using the instruction correctly.