OSDN Git Service

PR middle-end/22239
[pf3gnuchains/gcc-fork.git] / gcc / loop.c
index b9b2856..c0e3272 100644 (file)
@@ -5496,6 +5496,7 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map)
                                                  v->new_reg));
          else if (GET_CODE (*v->location) == PLUS
                   && REG_P (XEXP (*v->location, 0))
+                  && REG_P (v->new_reg)
                   && CONSTANT_P (XEXP (*v->location, 1)))
            loop_insn_emit_before (loop, 0, v->insn,
                                   gen_move_insn (XEXP (*v->location, 0),