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

            Bug ID: 71846
           Summary: PowerPC -mlra option causes 2 tests to fail
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org
  Target Milestone: ---

Two of the tests fail if -mlra is enabled:
testsuite/gcc.target/powerpc/bool3-p7.c
testsuite/gcc.target/powerpc/bool3-p8.c

They are actually the same test, just compiled with -mcpu=power7 and
-mcpu=power8 respectively.

The test does various boolean actions, trying to keep the action in the GPR
registers.  Reload does it all in the GPR registers, while LRA decides to move
the values to the vector registers in order to use the XXLNOR instruction,
either through direct move on p8 or store/load on p7.

The other logical operations are done in the GPR registers, just the complement
instruction forces the operation to vector registers.

Note, part of the issue is -mlra enables the -mvsx-timode option (the type
being operated on is __int128_t), which allows TImode to go into a vector
register.

While we can fix the test to use -mno-vsx-timode, we probably should look at
why LRA is causing the move from GPR to vector registers without realizing that
it can do the operation in a vector register.

Reply via email to