@@ -8463,7 +8463,6 @@ aarch64_get_separate_components (void)
if (reg1 != INVALID_REGNUM)
bitmap_clear_bit (components, reg1);
- bitmap_clear_bit (components, LR_REGNUM);
bitmap_clear_bit (components, SP_REGNUM);
return components;
@@ -8500,7 +8499,8 @@ aarch64_components_for_bb (basic_block bb)
/* GPRs are used in a bb if they are in the IN, GEN, or KILL sets. */
for (unsigned regno = 0; regno <= LAST_SAVED_REGNUM; regno++)
if (!fixed_regs[regno]
- && !crtl->abi->clobbers_full_reg_p (regno)
+ && (regno == R30_REGNUM
+ || !crtl->abi->clobbers_full_reg_p (regno))
&& (TEST_HARD_REG_BIT (extra_caller_saves, regno)
|| bitmap_bit_p (in, regno)
|| bitmap_bit_p (gen, regno)
new file mode 100644
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fomit-frame-pointer -fdump-rtl-pro_and_epilogue" } */
+
+void f();
+
+int g(int x)
+{
+ if (x == 0)
+ {
+ __asm__ ("":::"x19", "x20");
+ return 1;
+ }
+ f();
+ return 2;
+}
+
+/* { dg-final { scan-rtl-dump {The components we wrap separately are \[sep 30\]} "pro_and_epilogue" } } */