Message ID | alpine.BSF.2.02.1211302158360.57912@dair.pair.com |
---|---|
State | New |
Headers | show |
> Of course this matters only to >64bit (i.e. >registersize) values like > TImode, alias __int128. The problem here is that group-loading a > constant for a function return-value doesn't work; it's passed to > simplify_gen_subreg which horks on the VOIDmode constant. Thankfully, > the code below the context handles this case, twice the register-mode, > just fine, so let's just gate the simplify_gen_subreg call with a test > for a VOIDmode source. IMO that's not as clear a cut as it seems. simplify_gen_subreg is supposed to work on VOIDmode constants, at least to be callable on them, because there is the simplify_gen_subreg -> simplify_subreg -> simplify_immed_subreg path.
Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 192677) +++ gcc/expr.c (working copy) @@ -1739,7 +1739,9 @@ emit_group_load_1 (rtx *tmps, rtx dst, r emit_move_insn (mem, src); tmps[i] = adjust_address (mem, mode, (int) bytepos); } - else if (CONSTANT_P (src) && GET_MODE (dst) != BLKmode + else if (CONSTANT_P (src) + && GET_MODE (src) != VOIDmode + && GET_MODE (dst) != BLKmode && XVECLEN (dst, 0) > 1) tmps[i] = simplify_gen_subreg (mode, src, GET_MODE(dst), bytepos); else if (CONSTANT_P (src))