aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorRevital Eres <revital.eres@linaro.org>2012-01-02 10:54:00 +0000
committerRevital Eres <revitale@gcc.gnu.org>2012-01-02 10:54:00 +0000
commit8b61e8631a84fb0bc94ba03f04ac949f87402f85 (patch)
tree36b4795404ad49759db242ac7d9fa7804b2511ab /gcc/testsuite/gcc.dg
parentba768e1850d730bcd44e674fdf4f4fe252f85182 (diff)
downloadgcc-8b61e8631a84fb0bc94ba03f04ac949f87402f85.zip
gcc-8b61e8631a84fb0bc94ba03f04ac949f87402f85.tar.gz
gcc-8b61e8631a84fb0bc94ba03f04ac949f87402f85.tar.bz2
SMS: Prevent the creation of reg-moves for definitions with MODE_CC
From-SVN: r182786
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/sms-11.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/sms-11.c b/gcc/testsuite/gcc.dg/sms-11.c
new file mode 100644
index 0000000..6134598
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sms-11.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
+
+extern void abort (void);
+
+float out[4][4] = { 6, 6, 7, 5, 6, 7, 5, 5, 6, 4, 4, 4, 6, 2, 3, 4 };
+
+void
+invert (void)
+{
+ int i, j, k = 0, swap;
+ float tmp[4][4] = { 5, 6, 7, 5, 6, 7, 5, 5, 4, 4, 4, 4, 3, 2, 3, 4 };
+
+ for (i = 0; i < 4; i++)
+ {
+ for (j = i + 1; j < 4; j++)
+ if (tmp[j][i] > tmp[i][i])
+ swap = j;
+
+ if (swap != i)
+ tmp[i][k] = tmp[swap][k];
+ }
+
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 4; j++)
+ if (tmp[i][j] != out[i][j])
+ abort ();
+}
+
+int
+main ()
+{
+ invert ();
+ return 0;
+}
+
+/* { dg-final { cleanup-rtl-dump "sms" } } */