S/390: Fix PR85295
gcc/ChangeLog: 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com> PR target/85295 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint definitions. * config/s390/s390.md ("movti"): Add more alternatives for constant to GPR copies. gcc/testsuite/ChangeLog: 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com> PR target/85295 * gcc.target/s390/TI-constants-lra.c: New testcase. * gcc.target/s390/TI-constants-nolra.c: New testcase. From-SVN: r263396
This commit is contained in:
parent
0ff3dcd61a
commit
9f3c21d621
6 changed files with 131 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
|||
2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
|
||||
|
||||
PR target/85295
|
||||
* config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
|
||||
definitions.
|
||||
* config/s390/s390.md ("movti"): Add more alternatives for
|
||||
constant to GPR copies.
|
||||
|
||||
2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
|
||||
|
||||
* config/s390/s390.c: Fix whitespace damage throughout the file.
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
;; M -- Constant integer with a value of 0x7fffffff.
|
||||
;; N -- Multiple letter constraint followed by 4 parameter letters.
|
||||
;; 0..9,x: number of the part counting from most to least significant
|
||||
;; H,Q: mode of the part
|
||||
;; S,H,Q: mode of the part
|
||||
;; D,S,H: mode of the containing operand
|
||||
;; 0,F: value of the other parts (F - all bits set)
|
||||
;; --
|
||||
|
@ -204,7 +204,7 @@
|
|||
|
||||
;; N -- Multiple letter constraint followed by 4 parameter letters.
|
||||
;; 0..9,x: number of the part counting from most to least significant
|
||||
;; H,Q: mode of the part
|
||||
;; S,H,Q: mode of the part
|
||||
;; D,S,H: mode of the containing operand
|
||||
;; 0,F: value of the other parts (F = all bits set)
|
||||
;;
|
||||
|
@ -226,6 +226,18 @@
|
|||
(match_test "s390_N_constraint_str (\"xQS0\", ival)")))
|
||||
|
||||
|
||||
(define_constraint "NxHD0"
|
||||
"@internal"
|
||||
(and (match_code "const_int")
|
||||
(match_test "s390_N_constraint_str (\"xHD0\", ival)")))
|
||||
|
||||
|
||||
(define_constraint "NxSD0"
|
||||
"@internal"
|
||||
(and (match_code "const_int")
|
||||
(match_test "s390_N_constraint_str (\"xSD0\", ival)")))
|
||||
|
||||
|
||||
(define_constraint "NxQD0"
|
||||
"@internal"
|
||||
(and (match_code "const_int")
|
||||
|
|
|
@ -1512,8 +1512,8 @@
|
|||
; FIXME: More constants are possible by enabling jxx, jyy constraints
|
||||
; for TImode (use double-int for the calculations)
|
||||
(define_insn "movti"
|
||||
[(set (match_operand:TI 0 "nonimmediate_operand" "=d,S,v, v, v,v,d,v,R, d,o")
|
||||
(match_operand:TI 1 "general_operand" " S,d,v,j00,jm1,d,v,R,v,dT,d"))]
|
||||
[(set (match_operand:TI 0 "nonimmediate_operand" "=d,S,v, v, v,v,d,v,R,d, d, d, d, d,o")
|
||||
(match_operand:TI 1 "general_operand" " S,d,v,j00,jm1,d,v,R,v,K,NxHD0,Os,NxSD0,dT,d"))]
|
||||
"TARGET_ZARCH"
|
||||
"@
|
||||
lmg\t%0,%N0,%S1
|
||||
|
@ -1526,10 +1526,14 @@
|
|||
vl\t%v0,%1
|
||||
vst\t%v1,%0
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#"
|
||||
[(set_attr "op_type" "RSY,RSY,VRR,VRI,VRI,VRR,*,VRX,VRX,*,*")
|
||||
(set_attr "type" "lm,stm,*,*,*,*,*,*,*,*,*")
|
||||
(set_attr "cpu_facility" "*,*,vx,vx,vx,vx,vx,vx,vx,*,*")])
|
||||
[(set_attr "op_type" "RSY,RSY,VRR,VRI,VRI,VRR,*,VRX,VRX,*,*,*,*,*,*")
|
||||
(set_attr "type" "lm,stm,*,*,*,*,*,*,*,*,*,*,*,*,*")
|
||||
(set_attr "cpu_facility" "*,*,vx,vx,vx,vx,vx,vx,vx,*,*,*,extimm,*,*")])
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:TI 0 "nonimmediate_operand" "")
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
|
||||
|
||||
PR target/85295
|
||||
* gcc.target/s390/TI-constants-lra.c: New testcase.
|
||||
* gcc.target/s390/TI-constants-nolra.c: New testcase.
|
||||
|
||||
2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
|
||||
|
||||
* gcc.target/s390/hotpatch-8.c: Remove.
|
||||
|
|
47
gcc/testsuite/gcc.target/s390/TI-constants-lra.c
Normal file
47
gcc/testsuite/gcc.target/s390/TI-constants-lra.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* { dg-do compile { target int128 } } */
|
||||
/* { dg-options "-O3" } */
|
||||
|
||||
/* 2x lghi */
|
||||
__int128 a() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 2x lghi */
|
||||
__int128 b() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* 2x lghi */
|
||||
__int128 c() {
|
||||
return -2;
|
||||
}
|
||||
|
||||
/* lghi + llilh */
|
||||
__int128 d() {
|
||||
return 16000 << 16;
|
||||
}
|
||||
|
||||
/* lghi + llihf */
|
||||
__int128 e() {
|
||||
return (unsigned long long)80000 << 32;
|
||||
}
|
||||
|
||||
/* lghi + llihf */
|
||||
__int128 f() {
|
||||
return (unsigned __int128)80000 << 96;
|
||||
}
|
||||
|
||||
/* llihf + llihf - this is handled via movti_bigconst pattern */
|
||||
__int128 g() {
|
||||
return ((unsigned __int128)80000 << 96) | ((unsigned __int128)80000 << 32);
|
||||
}
|
||||
|
||||
/* Literal pool */
|
||||
__int128 h() {
|
||||
return ((unsigned __int128)80000 << 32) | 1;
|
||||
}
|
||||
|
||||
/* Literal pool */
|
||||
__int128 i() {
|
||||
return (((unsigned __int128)80000 << 32) | 1) << 64;
|
||||
}
|
47
gcc/testsuite/gcc.target/s390/TI-constants-nolra.c
Normal file
47
gcc/testsuite/gcc.target/s390/TI-constants-nolra.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* { dg-do compile { target int128 } } */
|
||||
/* { dg-options "-O3 -mno-lra" } */
|
||||
|
||||
/* 2x lghi */
|
||||
__int128 a() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 2x lghi */
|
||||
__int128 b() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* 2x lghi */
|
||||
__int128 c() {
|
||||
return -2;
|
||||
}
|
||||
|
||||
/* lghi + llilh */
|
||||
__int128 d() {
|
||||
return 16000 << 16;
|
||||
}
|
||||
|
||||
/* lghi + llihf */
|
||||
__int128 e() {
|
||||
return (unsigned long long)80000 << 32;
|
||||
}
|
||||
|
||||
/* lghi + llihf */
|
||||
__int128 f() {
|
||||
return (unsigned __int128)80000 << 96;
|
||||
}
|
||||
|
||||
/* llihf + llihf - this is handled via movti_bigconst pattern */
|
||||
__int128 g() {
|
||||
return ((unsigned __int128)80000 << 96) | ((unsigned __int128)80000 << 32);
|
||||
}
|
||||
|
||||
/* Literal pool */
|
||||
__int128 h() {
|
||||
return ((unsigned __int128)80000 << 32) | 1;
|
||||
}
|
||||
|
||||
/* Literal pool */
|
||||
__int128 i() {
|
||||
return (((unsigned __int128)80000 << 32) | 1) << 64;
|
||||
}
|
Loading…
Add table
Reference in a new issue