re PR rtl-optimization/87763 (aarch64 target testcases fail after r265398)
authorSteve Ellcey <sellcey@marvell.com>
Thu, 11 Apr 2019 18:02:41 +0000 (18:02 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 11 Apr 2019 18:02:41 +0000 (18:02 +0000)
2018-04-11  Steve Ellcey  <sellcey@marvell.com>

PR rtl-optimization/87763
* config/aarch64/aarch64.md (*aarch64_bfi<GPI:mode>4_noshift_alt):
New Instruction.

From-SVN: r270288

gcc/ChangeLog
gcc/config/aarch64/aarch64.md

index cf4434a941a78f457f7c344305eafe388b6102e3..970bdf8a4f54f2ead60ace479d97afd1c2b4b8b6 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-11  Steve Ellcey  <sellcey@marvell.com>
+
+       PR rtl-optimization/87763
+       * config/aarch64/aarch64.md (*aarch64_bfi<GPI:mode>4_noshift_alt):
+       New Instruction.
+
 2019-04-11  Tom de Vries  <tdevries@suse.de>
 
        * doc/extend.texi (@node Statement Exprs): Note variable shadowing at
index e0df975a03223b3549e63f5744ba727193585961..5a1894063a1ed2db1cc947c9c449d48808ed96ae 100644 (file)
 )
 
 ;; Like *aarch64_bfi<GPI:mode>5_shift but with no shifting, we are just
-;; copying the least significant bits of OP3 to OP0.
+;; copying the least significant bits of OP3 to OP0.  We need two versions
+;; of the instruction to handle different checks on the constant values.
 
 (define_insn "*aarch64_bfi<GPI:mode>4_noshift"
   [(set (match_operand:GPI 0 "register_operand" "=r")
   [(set_attr "type" "bfm")]
 )
 
+(define_insn "*aarch64_bfi<GPI:mode>4_noshift_alt"
+  [(set (match_operand:GPI 0 "register_operand" "=r")
+        (ior:GPI (and:GPI (match_operand:GPI 3 "register_operand" "r")
+                          (match_operand:GPI 4 "const_int_operand" "n"))
+                 (and:GPI (match_operand:GPI 1 "register_operand" "0")
+                          (match_operand:GPI 2 "const_int_operand" "n"))))]
+  "aarch64_masks_and_shift_for_bfi_p (<MODE>mode, UINTVAL (operands[2]), 0,
+                                     UINTVAL (operands[4]))"
+  "bfi\t%<GPI:w>0, %<GPI:w>3, 0, %P4"
+  [(set_attr "type" "bfm")]
+)
+
 (define_insn "*extr_insv_lower_reg<mode>"
   [(set (zero_extract:GPI (match_operand:GPI 0 "register_operand" "+r")
                          (match_operand 1 "const_int_operand" "n")