[Bug rtl-optimization/69161] [6 Regression] ICE in simplify_const_unary_operation, at simplify-rtx.c:1633

ktkachov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 7 15:51:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69161

--- Comment #2 from ktkachov at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #1)
> IMHO this is just invalid RTL.
> @findex vec_duplicate
> @item (vec_duplicate:@var{m} @var{x})
> This operation converts a scalar into a vector or a small vector into a
> larger one by duplicating the input values.  The output vector mode must have
> the same submodes as the input vector mode or the scalar modes, and the
> number of output parts must be an integer multiple of the number of input
> parts.
> 
> So, for (vec_duplicate:V4SI ()) the operand can be e.g SImode or V2SImode,
> but not some CCmode or similar.
> Thus, I'd expect you want:
> (vec_duplicate:V4SI (eq:SI (reg:CC_NZ 66 cc)
>         (const_int 0 [0])))
> Now, before combine the RTL is correct, but I think the bug is that e.g.
> aarch64_cstore<mode> predicate uses aarch64_comparison_predicate predicate,
> which is define_special_predicate and thus ignores mode.
> On say if_then_else ignoring the mode is fine, but not when you have a SET,
> which should have the same modes on SET_DEST and SET_SRC (unless the latter
> is VOIDmode).

hmm, so what should be the fix?
look for places where aarch64_comparison_operator is used and the mode matters
(like in sets) and replace them with a normal define_predicate form of
aarch64_comparison_operator ?


More information about the Gcc-bugs mailing list