diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.md | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr71436.c | 35 |
4 files changed, 50 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 091d78a..98254eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + PR target/71436 + * config/arm/arm.md (*load_multiple): Add reload_completed to + matching condition. + 2017-03-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Richard Biener <rguenth@suse.com> diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 8720a71..71cc109 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -11832,12 +11832,15 @@ ;; Patterns in ldmstm.md don't cover more than 4 registers. This pattern covers ;; large lists without explicit writeback generated for APCS_FRAME epilogue. +;; The operands are validated through the load_multiple_operation +;; match_parallel predicate rather than through constraints so enable it only +;; after reload. (define_insn "*load_multiple" [(match_parallel 0 "load_multiple_operation" [(set (match_operand:SI 2 "s_register_operand" "=rk") (mem:SI (match_operand:SI 1 "s_register_operand" "rk"))) ])] - "TARGET_32BIT" + "TARGET_32BIT && reload_completed" "* { arm_output_multireg_pop (operands, /*return_pc=*/false, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 257c5ce..14b7516 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + PR target/71436 + * gcc.c-torture/compile/pr71436.c: New test. + 2017-03-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Richard Biener <rguenther@suse.de> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr71436.c b/gcc/testsuite/gcc.c-torture/compile/pr71436.c new file mode 100644 index 0000000..ab08d5d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr71436.c @@ -0,0 +1,35 @@ +/* PR target/71436. */ + +#pragma pack(1) +struct S0 +{ + volatile int f0; + short f2; +}; + +void foo (struct S0 *); +int a, d; +static struct S0 b[5]; +static struct S0 c; +void fn1 (); +void +main () +{ + { + struct S0 e; + for (; d; fn1 ()) + { + { + a = 3; + for (; a >= 0; a -= 1) + { + { + e = c; + } + b[a] = e; + } + } + } + } + foo (b); +} |