diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2015-01-31 16:30:30 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2015-01-31 16:30:30 +0100 |
commit | 0d9a5f8adcbb8ce4cd89a15b98daf77205c5eac5 (patch) | |
tree | a12d964cf45afdf3eeb8f14eddb4a316a4ec7668 /gcc | |
parent | 6b92143e786b7054f984b3e056d7312fa6cd4a15 (diff) | |
download | gcc-0d9a5f8adcbb8ce4cd89a15b98daf77205c5eac5.zip gcc-0d9a5f8adcbb8ce4cd89a15b98daf77205c5eac5.tar.gz gcc-0d9a5f8adcbb8ce4cd89a15b98daf77205c5eac5.tar.bz2 |
re PR target/64882 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at simplify-rtx.c:5681)
2015-01-31 Uros Bizjak <ubizjak@gmail.com>
PR target/64882
* config/i386/predicates.md (address_no_seg_operand): Reject
non-CONST_INT_P operands in invalid mode.
2015-01-31 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*prefetch_prefetchw1): Remove mode of
address_operand 0. Rename from *prefetch_prefetchwt1_<mode>.
* config/i386/predicates.md (address_no_seg_operand): Call
address_operand with VOIDmode.
(vsib_address_operand): Ditto.
(address_mpx_no_base_operand): Ditto.
(address_mpx_no_index_operand): Ditto.
testsuite/ChangeLog:
2015-01-31 Uros Bizjak <ubizjak@gmail.com>
PR target/64882
* gcc.dg/torture/pr64882.c: New test.
From-SVN: r220306
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 13 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr64882.c | 33 |
5 files changed, 65 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e1e8bb..19cb15c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2015-01-31 Uros Bizjak <ubizjak@gmail.com> + + PR target/64882 + * config/i386/predicates.md (address_no_seg_operand): Reject + non-CONST_INT_P operands in invalid mode. + +2015-01-31 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md (*prefetch_prefetchw1): Remove mode of + address_operand 0. Rename from *prefetch_prefetchwt1_<mode>. + * config/i386/predicates.md (address_no_seg_operand): Call + address_operand with VOIDmode. + (vsib_address_operand): Ditto. + (address_mpx_no_base_operand): Ditto. + (address_mpx_no_index_operand): Ditto. + 2015-01-30 Vladimir Makarov <vmakarov@redhat.com> PR target/64688 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 5cefa81..2d3d075 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -18117,8 +18117,8 @@ (symbol_ref "memory_address_length (operands[0], false)")) (set_attr "memory" "none")]) -(define_insn "*prefetch_prefetchwt1_<mode>" - [(prefetch (match_operand:P 0 "address_operand" "p") +(define_insn "*prefetch_prefetchwt1" + [(prefetch (match_operand 0 "address_operand" "p") (const_int 1) (const_int 2))] "TARGET_PREFETCHWT1" diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 40dfa51..0f314cc 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -966,11 +966,16 @@ ;; a segment override. Defined as a special predicate to allow ;; mode-less const_int operands pass to address_operand. (define_special_predicate "address_no_seg_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; + if (!CONST_INT_P (op) + && mode != VOIDmode + && GET_MODE (op) != mode) + return false; + ok = ix86_decompose_address (op, &parts); gcc_assert (ok); return parts.seg == SEG_DEFAULT; @@ -979,7 +984,7 @@ ;; Return true if op if a valid base register, displacement or ;; sum of base register and displacement for VSIB addressing. (define_predicate "vsib_address_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; @@ -1020,7 +1025,7 @@ ;; Return true if op is valid MPX address operand without base (define_predicate "address_mpx_no_base_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; @@ -1052,7 +1057,7 @@ ;; Return true if op is valid MPX address operand without index (define_predicate "address_mpx_no_index_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2569341..54dc543 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-31 Uros Bizjak <ubizjak@gmail.com> + + PR target/64882 + * gcc.dg/torture/pr64882.c: New test. + 2015-01-31 David Edelsohn <dje.gcc@gmail.com> PR target/64159 diff --git a/gcc/testsuite/gcc.dg/torture/pr64882.c b/gcc/testsuite/gcc.dg/torture/pr64882.c new file mode 100644 index 0000000..462edac --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr64882.c @@ -0,0 +1,33 @@ +/* PR target/64882 */ +/* { dg-do compile } */ + +int a, d, e; +long long b; +static long long *c = &b; + +void +fn1 (short p) +{ +} + +long long +fn2 (long long p1, long long p2) +{ + return (p1 && p1 > 26854775807LL - p2) || p1 < -p2 ? p1 : p1 + p2; +} + +void +fn3 () +{ + long long f; + int g = 3; + int *h = &a; + for (e = 0; e < 2; e++) + { + int *i = &g; + if (!fn2 (*c, 7 < d % (*i)--)) + f = fn2 ((*h <= 0) | b, 5278350700LL); + *h = f; + fn1 (*h); + } +} |