]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AArch64: Fix assert in aarch64_move_imm [PR108006]
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Wed, 7 Dec 2022 14:16:24 +0000 (14:16 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Wed, 7 Dec 2022 16:59:07 +0000 (16:59 +0000)
Ensure we only pass SI/DImode which fixes the assert.

gcc/
PR target/108006
* config/aarch64/aarch64.cc (aarch64_expand_sve_const_vector):
Fix call to aarch64_move_imm to use SI/DI.

gcc/config/aarch64/aarch64.cc

index 89bf0dff904b6b52b71841aec299541f01884f3d..27a814d862101ce244c52d4863c6158cf549f066 100644 (file)
@@ -6513,7 +6513,8 @@ aarch64_expand_sve_const_vector (rtx target, rtx src)
          /* If the integer can be moved into a general register by a
             single instruction, do that and duplicate the result.  */
          if (CONST_INT_P (elt_value)
-             && aarch64_move_imm (INTVAL (elt_value), elt_mode))
+             && aarch64_move_imm (INTVAL (elt_value),
+                                  encoded_bits <= 32 ? SImode : DImode))
            {
              elt_value = force_reg (elt_mode, elt_value);
              return expand_vector_broadcast (mode, elt_value);