Peter, Kewen:

Per Peter's request, I did the following testing on ltcd97-lp7 which is a Power 10 running in BE mode.

On 7/29/24 8:47 AM, Peter Bergner wrote:
Maybe the following will work?

+/* { dg-do run  { target power10_hw } } */
+/* { dg-do link { target { ! power10_hw } } } */
+/* { dg-require-effective-target int128 } */
...

Carl, can you try testing the above change on ltcd97-lp7 and run the test
in both 32-bit and 64-bit modes?
I tested with the above specification and -m64 and I get

    # of expected passes            8

I tested the above specification with -m32

<snip>
/home/carll/GCC/gcc-steve/gcc/testsuite/gcc.target/powerpc/vec-shift-double-run\
nable-int128.c:390:346: warning: overflow in conversion from 'long long int' to\  'int' changes value from '8526495043095935640' to '-19088744' [-Woverflow]^M
/home/carll/GCC/gcc-steve/gcc/testsuite/gcc.target/powerpc/vec-shift-double-run\
nable-int128.c:394:60: error: '__int128' is not supported on this target^

<snip>

FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c (test for excess er\
rors)
gcc.target/powerpc/vec-shift-double-runnable-int128.c: \\mvsrdbi\\M found 0 tim\
es
FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c scan-assembler-time\
s \\mvsrdbi\\M 2
gcc.target/powerpc/vec-shift-double-runnable-int128.c: \\mvsldbi\\M found 0 tim\
es
FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c scan-assembler-time\
s \\mvsldbi\\M 2
gcc.target/powerpc/vec-shift-double-runnable-int128.c: \\mvsl\\M found 0 times FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c scan-assembler-time\
s \\mvsl\\M 2
gcc.target/powerpc/vec-shift-double-runnable-int128.c: \\mvsr\\M found 0 times FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c scan-assembler-time\
s \\mvsr\\M 2
gcc.target/powerpc/vec-shift-double-runnable-int128.c: \\mvslo\\M found 0 times FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c scan-assembler-time\
s \\mvslo\\M 4
gcc.target/powerpc/vec-shift-double-runnable-int128.c: \\mvsro\\M found 0 times FAIL: gcc.target/powerpc/vec-shift-double-runnable-int128.c scan-assembler-time\
s \\mvsro\\M 4


# of unexpected failures        7

Basically, the header is not detecting the int128.

But if I put the int128 in the dg-do run line, like vsc-buildin-20d.c

/* { dg-do run  { target { power10_hw }  && { int128 } } } */
/* { dg-do link { target { ! power10_hw } } } */
/* { dg-require-effective-target vsx_hw  } */

I get the following with -m32:

# of unsupported tests          1


Per the comments from Kewen:

On 7/29/24 7:27 PM, Kewen.Lin wrote:
Maybe the following will work?

+/* { dg-do run  { target power10_hw } } */
+/* { dg-do link { target { ! power10_hw } } } */
Maybe we can replace link by compile here, as we care about compilation and
execution result more here.  (IMHO if it's still "link", power10_ok is useful
to stop this being tested on an environment with an assembler not supporting
power10).

BR,
Kewen


I tried, I hope I got it right, with -m32t:

/* { dg-do run  { target power10_hw } } */
/* { dg-do compile  { target { ! power10_hw } } } */
/* { dg-require-effective-target int128 } */

This gives:

# of unsupported tests          1

The same header with -m64 I get:

# of expected passes            8

This header seems to give us what we want on Power10 BE with -m32 and m64 (tested on ltcd97-lp7).

                                                             Carl


Reply via email to