This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78543] [6 Regression] ICE in push_reload, at reload.c:1349 on powerpc64le-linux-gnu
- 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: Wed, 22 Mar 2017 23:08:10 +0000
- Subject: [Bug target/78543] [6 Regression] ICE in push_reload, at reload.c:1349 on powerpc64le-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-78543-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78543
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|bergner at gcc dot gnu.org |meissner at gcc dot gnu.org
--- Comment #17 from Michael Meissner <meissner at gcc dot gnu.org> ---
While Peter is away, I looked into this.
The bug happens when the RELOAD register allocator tries to do a bswap
operation. I believe in the original test case, the compiler identifies the
case as something that could be optimized to __builtin_bswap16. In the second
case, the code has an explicit __builtin_bswap32 call.
This bug shows up on little endian systems and not on big endian systems. This
is due to the bswap instruction being called with a SUBREG. Reload gets
confused with this, and LRA decides to do a store, so that it can then do a
LWBRX instruction.
If we copy the SUBREG to a new register, it works for the second case provided.
I can't get the first case to fail.