b/gcc/testsuite/gcc.target/arm/shrink-wrap-interrupt_1.c
new file mode 100644
@@ -0,0 +1,24 @@
+/* Verify that shrink-wrapping works for functions
+ with __attribute__ ((interrupt)). */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_nothumb } */
+/* { dg-options "-O2 -marm -mapcs -fdump-rtl-pro_and_epilogue" } */
+
+/* This test is not valid when -mthumb. */
+
+extern void test (int, int) __attribute__ ((interrupt ("IRQ")));
+int p;
+
+void
+test (int a, int b)
+{
+ if (a > b)
+ {
+ p = a + 0x123456;
+ p = p * (b - 0x9879876);
+ }
+}
+
+/* { dg-final { scan-rtl-dump "Performing shrink-wrapping"
"pro_and_epilogue" } } */
+/* { dg-final { cleanup-rtl-dump "pro_and_epilogue" } } */
b/gcc/testsuite/gcc.target/arm/shrink-wrap-interrupt_2.c
new file mode 100644
@@ -0,0 +1,24 @@
+/* Verify that shrink-wrapping works for functions
+ with __attribute__ ((interrupt)). */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_nothumb } */
+/* { dg-options "-O2 -marm -mapcs -fdump-rtl-pro_and_epilogue" } */
+
+/* This test is not valid when -mthumb. */
+
+extern void test (int, int) __attribute__ ((interrupt ("IRQ")));
+int p;
+
+void
+test (int a, int b)
+{
+ if (a)
+ {
+ p = a + 0x123456;
+ p = p * (b - 0x9879876);
+ }
+}
+
+/* { dg-final { scan-rtl-dump-not "Performing shrink-wrapping"
"pro_and_epilogue" } } */