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

            Bug ID: 106345
           Summary: Some ppc64le tests fail with -mcpu=power9
                    -mtune=power9
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

A few tests fail when GCC is configured with --with-cpu-64=power9
--with-tune-64=power9:

gcc.target/powerpc/lhs-3.c
gcc.target/powerpc/loop_align.c
gcc.target/powerpc/pr92398.p9-.c

It would be nice if we could strengthen the tests to pass with -mtune=power9
-mcpu=power9 too.

In detail:

# gcc -O2 -mdejagnu-cpu=power7 lhs-3.c -S -mtune=power8
# grep ori lhs-3.s
        ori 2,2,0

but with the power9 default:

# gcc -O2 -mdejagnu-cpu=power7 lhs-3.c -S
# grep ori lhs-3.s
#

The second:

# gcc loop_align.c -fdiagnostics-plain-output -O2 -mdejagnu-cpu=power7
-falign-functions=16 -fno-unroll-loops -ffat-lto-objects -fno-ident -S -o
loop_align.s
# grep p2align loop_align.s
        .p2align 4,,15
        .p2align 4,,15
# gcc loop_align.c -fdiagnostics-plain-output -O2 -mdejagnu-cpu=power7
-falign-functions=16 -fno-unroll-loops -ffat-lto-objects -fno-ident -S -o
loop_align.s -mtune=power8
# grep p2align loop_align.s
        .p2align 4,,15
        .p2align 5

And the third test:

# gcc pr92398.p9-.c -fdiagnostics-plain-output -O2 -mvsx -ffat-lto-objects
-fno-ident -S -o pr92398.p9-.s -mtune=power8 -mcpu=power8
# grep -E '(std|not)' pr92398.p9-.s
        not 4,4
        not 5,5
        std 4,0(3)
        std 5,8(3)
        .section        .note.GNU-stack,"",@progbits
# gcc pr92398.p9-.c -fdiagnostics-plain-output -O2 -mvsx -ffat-lto-objects
-fno-ident -S -o pr92398.p9-.s 
# grep -E '(std|not)' pr92398.p9-.s
        .section        .note.GNU-stack,"",@progbits

Reply via email to