public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [AArch64, committed] Fix label mode
@ 2017-08-22  9:25 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2017-08-22  9:25 UTC (permalink / raw)
  To: gcc-patches

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.

Tested on aarch64-linux-gnu and applied as obvious.

Richard


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.

Index: gcc/config/aarch64/aarch64.md
===================================================================
--- gcc/config/aarch64/aarch64.md	2017-08-22 10:11:45.067177420 +0100
+++ gcc/config/aarch64/aarch64.md	2017-08-22 10:13:02.285442249 +0100
@@ -498,7 +498,7 @@ (define_expand "casesi"
 						 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-22  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22  9:25 [AArch64, committed] Fix label mode Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).