[COMMITTED] x86: Add a test for PR rtl-optimization/111673
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Add a test for the target independent bug, PR rtl-optimization/111673.
PR rtl-optimization/111673
* gcc.target/i386/pr111673.c: New file.
From 149da4e8927509a4e72eb01ee8277b6952757c7c Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sun, 2 Feb 2025 06:46:29 +0800
Subject: [PATCH] x86: Add a test for PR rtl-optimization/111673
Add a test for the target independent bug, PR rtl-optimization/111673.
PR rtl-optimization/111673
* gcc.target/i386/pr111673.c: New file.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
gcc/testsuite/gcc.target/i386/pr111673.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/i386/pr111673.c
new file mode 100644
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */
+
+/* Verify there is an early return without the prolog and shrink-wrap
+ the function. */
+
+int f (int);
+int
+advance (int dz)
+{
+ if (dz > 0)
+ return (dz + dz) * dz;
+ else
+ return dz * f (dz);
+}
+
+/* { dg-final { scan-rtl-dump-times "Performing shrink-wrapping" 1 "pro_and_epilogue" } } */
--
2.48.1