https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122126
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crazylht at gmail dot com
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> It might have been better to open two separate bugs.
>
> Confirmed for x86-64.
Middle end is passing out-of-range op2 value to vec_set<mode> expander:
(const_int 690501320391798396 [0x995274adee42e7c])
This should probably be fixed in the middle end to reject out-of-range indexes:
‘vec_setM’
Set given field in the vector value. Operand 0 is the vector to
modify, operand 1 is new value of field and operand 2 specify the
field index.
OTOH, the expander reads as:
(define_expand "vec_set<mode>"
[(match_operand:V_128 0 "register_operand")
(match_operand:<ssescalarmode> 1 "register_operand")
(match_operand 2 "vec_setm_sse41_operand")]
where *mode-less* op2 allows:
(define_predicate "vec_setm_sse41_operand"
(ior (and (match_operand 0 "register_operand")
(match_test "TARGET_SSE4_1"))
(match_code "const_int")))
so, pseudos in any mode and unbounded CONST_INT RTXes.