diff options
author | Juergen Christ <jchrist@linux.ibm.com> | 2023-11-20 09:12:43 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.ibm.com> | 2023-11-23 15:32:00 +0100 |
commit | 111b5555c7a37f0bcf41c27363bbe8acbb6eb238 (patch) | |
tree | 19ef6397850eea0081acd7e62f07ff3fd6801e35 /gcc | |
parent | 2add85eeb01cb3d5db841a3d271bd7c37a77dba1 (diff) | |
download | gcc-111b5555c7a37f0bcf41c27363bbe8acbb6eb238.zip gcc-111b5555c7a37f0bcf41c27363bbe8acbb6eb238.tar.gz gcc-111b5555c7a37f0bcf41c27363bbe8acbb6eb238.tar.bz2 |
s390: split int128 load
Issue two loads when using GPRs instead of one load-multiple.
Bootstrapped and tested on s390. OK for mainline?
gcc/ChangeLog:
* config/s390/s390.md: Split TImode loads.
gcc/testsuite/ChangeLog:
* gcc.target/s390/int128load.c: New test.
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/s390/s390.md | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/int128load.c | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index bc740a7..4aa4a94 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -1688,8 +1688,6 @@ [(set (match_operand:TI 0 "nonimmediate_operand" "") (match_operand:TI 1 "general_operand" ""))] "TARGET_ZARCH && reload_completed - && !s_operand (operands[0], TImode) - && !s_operand (operands[1], TImode) && s390_split_ok_p (operands[0], operands[1], TImode, 0)" [(set (match_dup 2) (match_dup 4)) (set (match_dup 3) (match_dup 5))] @@ -1704,8 +1702,6 @@ [(set (match_operand:TI 0 "nonimmediate_operand" "") (match_operand:TI 1 "general_operand" ""))] "TARGET_ZARCH && reload_completed - && !s_operand (operands[0], TImode) - && !s_operand (operands[1], TImode) && s390_split_ok_p (operands[0], operands[1], TImode, 1)" [(set (match_dup 2) (match_dup 4)) (set (match_dup 3) (match_dup 5))] diff --git a/gcc/testsuite/gcc.target/s390/int128load.c b/gcc/testsuite/gcc.target/s390/int128load.c new file mode 100644 index 0000000..3eb335c --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/int128load.c @@ -0,0 +1,14 @@ +/* Check that int128 loads and stores are split. */ + +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O3 -mzarch -march=zEC12" } */ + +__int128 global; + +void f(__int128 x) +{ + global = x; +} + +/* { dg-final { scan-assembler-times "lg\t" 2 } } */ +/* { dg-final { scan-assembler-times "stg\t" 2 } } */ |