https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #8)
> (In reply to Andrew Pinski from comment #7)
> > cannot be conditional executed.
> 
> That is because most of the insn patterns in sync.md don't have 
>   [(set_attr "conds" "nocond")])
> 
> on them ....
> 
> Someone will have to submit that patch after testing, I don't have the
> bandwidth to do it though.

Actually wait that is the not fix.

This should work, I think:
```
diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index c44047c377a..d55ea59a727 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -25611,11 +25611,12 @@ arm_final_prescan_insn (rtx_insn *insn)

            case INSN:
              /* Instructions using or affecting the condition codes make it
-                fail.  */
+                fail or ones which cannot be predicable.  */
              scanbody = PATTERN (this_insn);
              if (!(GET_CODE (scanbody) == SET
                    || GET_CODE (scanbody) == PARALLEL)
-                 || get_attr_conds (this_insn) != CONDS_NOCOND)
+                 || get_attr_conds (this_insn) != CONDS_NOCOND
+                 || get_attr_predicable (this_insn) != PREDICABLE_YES)
                fail = TRUE;
              break;

```

Reply via email to