Message ID | j0rapq$rnv$1@dough.gmane.org |
---|---|
State | New |
Headers | show |
diff --git a/gcc/combine.c b/gcc/combine.c index 4dbf022..5885f2a 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12746,6 +12746,11 @@ get_last_value (const_rtx x) && DF_INSN_LUID (rsp->last_set) >= subst_low_luid) return 0; + /* If the value was set to the register when this was using a different mode + then we can't use it. */ + if(rsp->last_set_mode != GET_MODE(x)) + return 0; + /* If the value has all its registers valid, return it. */ if (get_last_value_validate (&value, rsp->last_set, rsp->last_set_label, 0)) return value;