From: Richard Sandiford Date: Tue, 22 Aug 2017 09:17:16 +0000 (+0000) Subject: [AArch64] Fix label mode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4033e62c978ce5bdbdc9bd637a7b08f38cc95a09;p=gcc.git [AArch64] Fix label mode 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 Alan Hayward David Sherwood gcc/ * config/aarch64/aarch64.md (casesi): Use DImode rather than VOIDmode for the LABEL_REF. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r251266 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a32a5d6498b..6ecd62601a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-22 Richard Sandiford + Alan Hayward + David Sherwood + + * config/aarch64/aarch64.md (casesi): Use DImode rather than + VOIDmode for the LABEL_REF. + 2017-08-22 Richard Biener * tree-cfg.c (gimple_split_edge): Avoid reallocating target diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 64b60a903ed..c1bca07308d 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -495,7 +495,7 @@ 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;