https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108410
--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> --- > and the key thing to optimize is > > ivtmp_78 = ivtmp_77 + 4294967232; // -64 > _79 = MIN_EXPR <ivtmp_78, 255>; > _80 = (unsigned char) _79; > _81 = {_80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, > _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, > _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, > _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, > _80, _80, _80, _80, _80, _80}; > > that is we want to broadcast a saturated (to vector element precision) value. Yes, backend needs to support vec_pack_ssat_m, vec_pack_usat_m. But I didn't find optab for ss_truncate or us_truncate which might be used by BB vectorizer.