52 lines
1.3 KiB
Diff
52 lines
1.3 KiB
Diff
|
2012-05-02 Jakub Jelinek <jakub@redhat.com>
|
||
|
|
||
|
PR target/53187
|
||
|
* config/arm/arm.c (arm_select_cc_mode): If x has MODE_CC class
|
||
|
mode, return that mode.
|
||
|
|
||
|
* gcc.target/arm/pr53187.c: New test.
|
||
|
* gcc.c-torture/compile/pr53187.c: New test.
|
||
|
|
||
|
--- gcc/config/arm/arm.c.jj 2012-05-02 09:38:35.000000000 +0200
|
||
|
+++ gcc/config/arm/arm.c 2012-05-02 11:19:51.582016484 +0200
|
||
|
@@ -11964,6 +11964,9 @@ arm_select_cc_mode (enum rtx_code op, rt
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+ if (GET_MODE_CLASS (GET_MODE (x)) == MODE_CC)
|
||
|
+ return GET_MODE (x);
|
||
|
+
|
||
|
return CCmode;
|
||
|
}
|
||
|
|
||
|
--- gcc/testsuite/gcc.target/arm/pr53187.c.jj 2012-05-02 11:36:43.058192951 +0200
|
||
|
+++ gcc/testsuite/gcc.target/arm/pr53187.c 2012-05-02 11:36:39.224212716 +0200
|
||
|
@@ -0,0 +1,13 @@
|
||
|
+/* PR target/53187 */
|
||
|
+/* { dg-do compile } */
|
||
|
+/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2" } */
|
||
|
+
|
||
|
+void bar (int);
|
||
|
+
|
||
|
+void
|
||
|
+foo (int x, double y, double z)
|
||
|
+{
|
||
|
+ _Bool t = z >= y;
|
||
|
+ if (!t || x)
|
||
|
+ bar (t ? 1 : 16);
|
||
|
+}
|
||
|
--- gcc/testsuite/gcc.c-torture/compile/pr53187.c.jj 2012-05-02 11:36:58.053105849 +0200
|
||
|
+++ gcc/testsuite/gcc.c-torture/compile/pr53187.c 2012-05-02 11:37:09.470039372 +0200
|
||
|
@@ -0,0 +1,11 @@
|
||
|
+/* PR target/53187 */
|
||
|
+
|
||
|
+void bar (int);
|
||
|
+
|
||
|
+void
|
||
|
+foo (int x, double y, double z)
|
||
|
+{
|
||
|
+ _Bool t = z >= y;
|
||
|
+ if (!t || x)
|
||
|
+ bar (t ? 1 : 16);
|
||
|
+}
|