44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
2012-01-26 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
PR target/52006
|
|
* config/arm/arm.md (pic_add_dot_plus_eight peephole2): Use
|
|
arm_general_register_operand predicate for operand 2 instead of
|
|
register_operand.
|
|
|
|
* gcc.target/arm/pr52006.c: New test.
|
|
|
|
--- gcc/config/arm/arm.md.jj 2012-01-20 12:35:15.000000000 +0100
|
|
+++ gcc/config/arm/arm.md 2012-01-26 10:24:13.082570508 +0100
|
|
@@ -5719,7 +5719,8 @@ (define_peephole2
|
|
(const_int 8)
|
|
(match_operand 1 "" "")]
|
|
UNSPEC_PIC_BASE))
|
|
- (set (match_operand:SI 2 "register_operand" "") (mem:SI (match_dup 0)))]
|
|
+ (set (match_operand:SI 2 "arm_general_register_operand" "")
|
|
+ (mem:SI (match_dup 0)))]
|
|
"TARGET_ARM && peep2_reg_dead_p (2, operands[0])"
|
|
[(set (match_dup 2)
|
|
(mem:SI (unspec:SI [(match_dup 3)
|
|
--- gcc/testsuite/gcc.target/arm/pr52006.c.jj 2012-01-26 10:32:27.989658669 +0100
|
|
+++ gcc/testsuite/gcc.target/arm/pr52006.c 2012-01-26 10:32:34.626620068 +0100
|
|
@@ -0,0 +1,19 @@
|
|
+/* PR target/52006 */
|
|
+/* { dg-do compile } */
|
|
+/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2 -fPIC" } */
|
|
+
|
|
+unsigned long a;
|
|
+static int b;
|
|
+
|
|
+void
|
|
+foo (void)
|
|
+{
|
|
+ asm volatile ("" : "=r" (b));
|
|
+}
|
|
+
|
|
+void
|
|
+bar (float f)
|
|
+{
|
|
+ if (f < b / 100.0)
|
|
+ a = 1;
|
|
+}
|