From: Andreas Krebbel Date: Tue, 19 May 2015 17:21:56 +0000 (+0000) Subject: S/390: Make shift_count_or_setmem_operand predicate to check for mode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e8ea2fc165e50248f1c6b6b78bc8b365881a09b;p=gcc.git S/390: Make shift_count_or_setmem_operand predicate to check for mode. gcc/ * config/s390/predicates.md (shift_count_or_setmem_operand): Add mode check to make sure that only scalar integer values are accepted. From-SVN: r223392 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c8a5268018..dea95c19f88 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-19 Andreas Krebbel + + * config/s390/predicates.md (shift_count_or_setmem_operand): Add + mode check to make sure that only scalar integer values are + accepted. + 2015-05-19 Jan Hubicka * tree.c (verify_type_variant): Fix #undef. diff --git a/gcc/config/s390/predicates.md b/gcc/config/s390/predicates.md index 4d3fd97a1e2..90758b14896 100644 --- a/gcc/config/s390/predicates.md +++ b/gcc/config/s390/predicates.md @@ -75,7 +75,7 @@ (and (match_test "mode == Pmode") (match_test "!legitimate_la_operand_p (op)")))) -;; Return true if OP is a valid operand as shift count or setmem. +;; Return true if OP is a valid operand as scalar shift count or setmem. (define_predicate "shift_count_or_setmem_operand" (match_code "reg, subreg, plus, const_int") @@ -83,6 +83,10 @@ HOST_WIDE_INT offset; rtx base; + if (GET_MODE (op) != VOIDmode + && GET_MODE_CLASS (GET_MODE (op)) != MODE_INT) + return false; + /* Extract base register and offset. */ if (!s390_decompose_shift_count (op, &base, &offset)) return false;