diff mbox series

[19/19,GCC-8] re PR target/90724 (ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve)

Message ID a0ba26ce-40c4-623d-0b22-5ddbc39ebf3a@arm.com
State New
Headers show
Series aarch64: Backport outline atomics | expand

Commit Message

Andre Vieira (lists) April 16, 2020, 12:27 p.m. UTC
2020-04-16  Andre Vieira <andre.simoesdiasvieira@arm.com>

     Backport from mainline
     2019-08-21  Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>

     PR target/90724
     * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): Force y
     in reg if it fails aarch64_plus_operand predicate.
diff mbox series

Patch

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 6bac63402e508027e77a9f4557cb10c578ea7c2c..0da927be15c339295ef940d6e05a37e95135aa5a 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1574,6 +1574,9 @@  aarch64_gen_compare_reg_maybe_ze (RTX_CODE code, rtx x, rtx y,
 	}
     }
 
+  if (!aarch64_plus_operand (y, y_mode))
+    y = force_reg (y_mode, y);
+
   return aarch64_gen_compare_reg (code, x, y);
 }