re PR target/90724 (ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve)
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Wed, 21 Aug 2019 18:34:43 +0000 (18:34 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Wed, 21 Aug 2019 18:34:43 +0000 (18:34 +0000)
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.

From-SVN: r274805

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 7550e422dadd7e2eed72df58ebe59e3cd90e34fc..e5ae7ad86e36ccd642af6fc8d7d2345f88e08825 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2019-08-21  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/91482
index 146d0201f50e0f02a9c7a3e0f8515070fdb42f76..23f72160fbbfd34167f577409dad98214f357d57 100644 (file)
@@ -2070,6 +2070,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);
 }