[COMMITTED][AArch64] Add missing return in aarch64_internal_mov_immediate

Wilco Dijkstra Wilco.Dijkstra@arm.com
Wed Feb 17 11:56:00 GMT 2016

As part of the final cleanup of aarch64_internal_mov_immediate a return was
accidentally removed.  This causes the 2-instruction case to fallthrough
into the general case even when it found a match.  An example immediate is
0xcccccccccccccccd which was using 2 instructions in GCC5 but now requires 4.
Adding the return fixes the regressions.

Committed as trivial in revision 233490.

2016-02-17  Wilco Dijkstra  <wdijkstr@arm.com>

        * config/aarch64/aarch64.c (aarch64_internal_mov_immediate):
        Add missing return.

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index a2fc3d05158e126f91e8274e9d5329f511d09530..9be5fbbd9716d9cf9568acee01996ff97ab5a654 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1632,6 +1632,7 @@ aarch64_internal_mov_immediate (rtx dest, rtx imm, bool generate,
 	      emit_insn (gen_insv_immdi (dest, GEN_INT (i),
 					 GEN_INT ((val >> i) & 0xffff)));
+	  return 2;

More information about the Gcc-patches mailing list