diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2017-04-25 11:15:44 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2017-04-25 11:15:44 +0000 |
commit | df7fbeebd809c93a0e68c8271f732d83c69c9c98 (patch) | |
tree | 94b77dba372ebbb62fd4f940bd65646feb8b7023 /gcc/config/s390/s390.md | |
parent | f3cd5c2c93e95bfbe9f192648420d90eeb462864 (diff) |
S/390: PR79895: Fix TImode constant handling
The P constraint letter is supposed to match every constant which is
acceptable during reload. However, constraints do not appear to be
able to handle const_wide_int yet. It works with predicates so the
alternative is modelled with a new predicate now.
gcc/ChangeLog:
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/79895
* config/s390/predicates.md (reload_const_wide_int_operand): New
predicate.
* config/s390/s390.md ("movti"): Remove d/P alternative.
("movti_bigconst"): New pattern definition.
gcc/testsuite/ChangeLog:
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/79895
* gcc.target/s390/pr79895.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@247190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390/s390.md')
-rw-r--r-- | gcc/config/s390/s390.md | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 8a700edab94..c9fd19aeb33 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -1494,11 +1494,20 @@ ; movti instruction pattern(s). ; + +; Separate out the register pair alternative since constraints (P) are +; not able to deal with const_wide_int's. But predicates do. +(define_insn "*movti_bigconst" + [(set (match_operand:TI 0 "register_operand" "=d") + (match_operand:TI 1 "reload_const_wide_int_operand" ""))] + "TARGET_ZARCH" + "#") + ; 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,dPT,d"))] + [(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"))] "TARGET_ZARCH" "@ lmg\t%0,%N0,%S1 |