Hi All,

The following patch has been tested on powerpc64le-linux and verified it's
fixed.

The test vsx-builtin-7.c was failing on powerpc64le-linux due to identical
function detection by ICF. This behavior was introduced by commit
r15-7961-gdc47161c1f32c3, which improved alias analysis in
ao_compare::compare_ao_refs, allowing the compiler to recognize and optimize
structurally identical functions.

The option -fno-ipa-icf is required because insert_di_0_v2 and insert_di_0 are
identified as equivalent, causing the compiler to replace insert_di_0_v2 with a
tail call to insert_di_0.

To prevent this optimization from altering the test behavior, explicitly disable
ICF by adding -fno-ipa-icf to the test options.


2025-03-25  Jeevitha Palanisamy  <jeevi...@linux.ibm.com>

gcc/testsuite/
        PR testsuite/119382
        * gcc.target/powerpc/vsx-builtin-7.c: Add '-fno-ipa-icf' to dg-options.

diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c 
b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
index 5095d5030fd..78e4e23d102 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power7 -fno-inline-functions" } */
+/* { dg-options "-O2 -mdejagnu-cpu=power7 -fno-inline-functions -fno-ipa-icf" 
} */
 /* { dg-require-effective-target powerpc_vsx } */
 
 /* Test simple extract/insert/slat operations.  Make sure all types are

Reply via email to