re PR target/15948 (THUMB: ICE with non-commutative cbranch)
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 23 Jun 2004 11:39:32 +0000 (11:39 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Wed, 23 Jun 2004 11:39:32 +0000 (11:39 +0000)
* PR target/15948
* arm.md (bicsi3_cbranch): Add alternative to handle tying operands
one and two.

From-SVN: r83549

gcc/ChangeLog
gcc/config/arm/arm.md

index 534cfae2cae9d6cdf8509beb38ffd8a35214716e..db45e7e2e9e79ee410c631f5a06309cd2a25b30a 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-23  Richard Earnshaw  <rearnsha@arm.com>
+
+       * PR target/15948
+       * arm.md (bicsi3_cbranch): Add alternative to handle tying operands
+       one and two.
+
 2004-06-23  Richard Earnshaw  <rearnsha@arm.com>
 
        PR target/15927
index 82f1701674f1e86eb953e12beb4459fd709941d2..fb13fe061f54b508213745d4a8aef0cec2ba69e5 100644 (file)
   [(set (pc)
        (if_then_else
         (match_operator 5 "equality_operator"
-         [(and:SI (not:SI (match_operand:SI 3 "s_register_operand" "l,l,l,l"))
-                  (match_operand:SI 2 "s_register_operand" "0,1,1,1"))
+         [(and:SI (not:SI (match_operand:SI 3 "s_register_operand" "l,l,l,l,l"))
+                  (match_operand:SI 2 "s_register_operand" "0,1,1,1,1"))
           (const_int 0)])
         (label_ref (match_operand 4 "" ""))
         (pc)))
-   (set (match_operand:SI 0 "thumb_cbrch_target_operand" "=l,*?h,*?m,*?m")
+   (set (match_operand:SI 0 "thumb_cbrch_target_operand" "=!l,l,*?h,*?m,*?m")
        (and:SI (not:SI (match_dup 3)) (match_dup 2)))
-   (clobber (match_scratch:SI 1 "=X,l,&l,&l"))]
+   (clobber (match_scratch:SI 1 "=X,l,l,&l,&l"))]
   "TARGET_THUMB"
   "*
   {
   if (which_alternative == 0)
     output_asm_insn (\"bic\\t%0, %3\", operands);
-  else if (which_alternative == 1)
+  else if (which_alternative <= 2)
     {
       output_asm_insn (\"bic\\t%1, %3\", operands);
+      /* It's ok if OP0 is a lo-reg, even though the mov will set the
+        conditions again, since we're only testing for equality.  */
       output_asm_insn (\"mov\\t%0, %1\", operands);
     }
   else