diff mbox

[testsuite,sparcv9] Fix gcc.dg/ifcvt-4.c on 64-bit SPARC (PR rtl-optimization/68749)

Message ID ydd60w3dcil.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth March 30, 2016, 6:52 p.m. UTC
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.
diff mbox

Patch

# 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)