This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/71805] incorrect code for test pr45752.c with -mcpu=power9
- From: "meissner at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Jul 2016 22:21:07 +0000
- Subject: [Bug target/71805] incorrect code for test pr45752.c with -mcpu=power9
- Auto-submitted: auto-generated
- References: <bug-71805-4@http.gcc.gnu.org/bugzilla/>
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.