This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite, sparcv9] Fix gcc.dg/ifcvt-4.c on 64-bit SPARC (PR rtl-optimization/68749)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jeff Law <law at redhat dot com>
- Date: Wed, 30 Mar 2016 20:52:18 +0200
- Subject: [testsuite, sparcv9] Fix gcc.dg/ifcvt-4.c on 64-bit SPARC (PR rtl-optimization/68749)
- Authentication-results: sourceware.org; auth=none
gcc.dg/ifcvt-4.c currently FAILs for 64-bit SPARC:
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
Eric suggested in the PR that Jeff's fix for PR rtl-optimization/69942
to gcc.dg/ifcvt-5.c applies here as well and indeed it does.
While I was at it, I removed the superfluous default args to dg-skip-if,
which only hinder readibility. I should probably make a pass over the
whole testsuite to get rid of this nonesense once stage 1 opens.
Tested with the appropriate runtest invocations on sparc-sun-solaris2.12
and i386-pc-solaris2.12. Ok for mainline?
Rainer
2016-03-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR rtl-optimization/68749
* gcc.dg/ifcvt-4.c: Use "word_mode" rather than "int" to limit the
effects of argument promotions.
Remove default args to dg-skip-if.
# HG changeset patch
# Parent a86884beb324b4a6a88b5f3dac6a6f72b8bbada1
Fix gcc.dg/ifcvt-4.c on 64-bit SPARC (PR rtl-optimization/68749)
diff --git a/gcc/testsuite/gcc.dg/ifcvt-4.c b/gcc/testsuite/gcc.dg/ifcvt-4.c
--- a/gcc/testsuite/gcc.dg/ifcvt-4.c
+++ b/gcc/testsuite/gcc.dg/ifcvt-4.c
@@ -1,12 +1,14 @@
/* { dg-options "-fdump-rtl-ce1 -O2 --param max-rtl-if-conversion-insns=3" } */
/* { dg-additional-options "-misel" { target { powerpc*-*-* } } } */
-/* { dg-skip-if "Multiple set if-conversion not guaranteed on all subtargets" { "arm*-*-* hppa*64*-*-* visium-*-*" } {"*"} { "" } } */
+/* { dg-skip-if "Multiple set if-conversion not guaranteed on all subtargets" { "arm*-*-* hppa*64*-*-* visium-*-*" } } */
-int
-foo (int x, int y, int a)
+typedef int word __attribute__((mode(word)));
+
+word
+foo (word x, word y, word a)
{
- int i = x;
- int j = y;
+ word i = x;
+ word j = y;
/* Try to make taking the branch likely. */
__builtin_expect (x > y, 1);
if (x > y)
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University