+2019-11-15 Matthew Malcomson <matthew.malcomson@arm.com>
+
+ * passes.c (skip_pass): Set epilogue_completed if skipping the
+ pro_and_epilogue pass.
+
2019-11-15 Matthew Malcomson <matthew.malcomson@arm.com>
* passes.c (should_skip_pass_p): Always run "dfinish".
if (strcmp (pass->name, "reload") == 0)
reload_completed = 1;
+ /* Similar for pass "pro_and_epilogue" and the "epilogue_completed" global
+ variable. */
+ if (strcmp (pass->name, "pro_and_epilogue") == 0)
+ epilogue_completed = 1;
+
/* The INSN_ADDRESSES vec is normally set up by
shorten_branches; set it up for the benefit of passes that
run after this. */
+2019-11-15 Matthew Malcomson <matthew.malcomson@arm.com>
+
+ * gcc.dg/rtl/aarch64/test-epilogue-set.c: New test.
+
2019-11-15 Matthew Malcomson <matthew.malcomson@arm.com>
* gcc.dg/rtl/aarch64/missed-pass-error.c: New test.
--- /dev/null
+/* { dg-do compile { target aarch64-*-* } } */
+
+/*
+ Should compile rather than ICE.
+ Compilation requires setting the "epilogue_completed" variable.
+ */
+int __RTL (startwith ("cprop_hardreg"))
+f ()
+{
+(function "f"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 6 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cinsn 100 (set (reg:DI x0)
+ (plus:DI
+ (reg:DI x1)
+ (const_int 16777213))))
+ ;; Extra insn, to avoid all of the above from being deleted by DCE
+ (cinsn 10 (use (reg/i:DI x0)))
+ (edge-to exit (flags "FALLTHRU"))
+ ) ;; block 2
+ ) ;; insn-chain
+) ;; function
+}