[committed] Add nomips16 attributes to gcc.dg/unroll_5.c

Message ID 87zk0dxxzb.fsf@talisman.default
State New
Headers show

Commit Message

Richard Sandiford Jan. 13, 2013, 8:56 a.m.
gcc.dg/unroll_5.c fails on MIPS16 because we don't recognise the
MIPS16 XOR-based equality comparisons as being equality comparisons.
I suppose that might be worth handling in principle, but unrolling
isn't something that MIPS16 users are likely to want anyway, so it's
not really an interesting use case.

Ideally we'd XFAIL this for MIPS16, but that's difficult because
of -mflip-mips16, which will cause one function to be compiled
normally (and work) and another to be compiled as -mips16 (and fail).
In the past I've added nomips16 attributes instead, so I've done
the same here.

Tested on x86_64-linux-gnu, mipsisa64-elf and mips64-linux-gnu.  Applied.


	* gcc.dg/unroll_5.c: Add nomips16 attributes.


Index: gcc/testsuite/gcc.dg/unroll_5.c
--- gcc/testsuite/gcc.dg/unroll_5.c	2012-11-27 18:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/unroll_5.c	2013-01-12 12:43:37.086146761 +0000
@@ -4,6 +4,11 @@ 
 void abort (void);
 int *a;
+/* Fails on MIPS16 because equality checks are implemented using XOR.
+   It's unlikely MIPS16 users would want unrolling anyway.  */
+#ifdef __mips
 int t()
    int i;
@@ -12,6 +17,9 @@  int t()
       return 1;
   return 0;
+#ifdef __mips
 int t2()
    int i;