[AArch64] Fix label mode
authorRichard Sandiford <richard.sandiford@linaro.org>
Tue, 22 Aug 2017 09:17:16 +0000 (09:17 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 22 Aug 2017 09:17:16 +0000 (09:17 +0000)
This patch fixes a case where we tried to force a VOIDmode label
into a DImode register, which led to invalid rtl that was previously
undiagnosed.

2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64.md (casesi): Use DImode rather than
VOIDmode for the LABEL_REF.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251266

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

index a32a5d6498bd8ee7a1b6baf06af12844d0ad0ba6..6ecd62601a1d38844b01ebc81ff9d0e7a1e15907 100644 (file)
@@ -1,3 +1,10 @@
+2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
+           Alan Hayward  <alan.hayward@arm.com>
+           David Sherwood  <david.sherwood@arm.com>
+
+       * config/aarch64/aarch64.md (casesi): Use DImode rather than
+       VOIDmode for the LABEL_REF.
+
 2017-08-22  Richard Biener  <rguenther@suse.de>
 
        * tree-cfg.c (gimple_split_edge): Avoid reallocating target
index 64b60a903ed7c0090298989333894442a277ccd4..c1bca07308d84f50a6fa5af116f0fa20589882db 100644 (file)
                                                 const0_rtx),
                                    operands[0], operands[2], operands[4]));
 
-    operands[2] = force_reg (DImode, gen_rtx_LABEL_REF (VOIDmode, operands[3]));
+    operands[2] = force_reg (DImode, gen_rtx_LABEL_REF (DImode, operands[3]));
     emit_jump_insn (gen_casesi_dispatch (operands[2], operands[0],
                                         operands[3]));
     DONE;