aboutsummaryrefslogtreecommitdiff
blob: 82fa84a2b6c8c6040a77b526404689ae92936710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 9b1d9f15e7ecfd7d27a2bb878efb6577741eecaa Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 18 Feb 2024 22:58:51 +0000
Subject: [PATCH] arm: fix inconsistency between atomic patterns and expected
 attributes

Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9.

Bug: https://gcc.gnu.org/PR113915
Bug: https://bugs.gentoo.org/924237
---
 gcc/config/arm/arm.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index 1cd69268ee98..9f0d2405b905 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -25614,11 +25614,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;
 
-- 
2.43.2