https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118950
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Robin Dapp from comment #5) > Yeah, the original statement is recognized as a mask conversion pattern: > > pr118950.c:9:21: note: vect_recog_mask_conversion_pattern: detected: _152 > = .MASK_LOAD (_230, 8B, _229, 0); > pr118950.c:9:21: note: mask_conversion pattern recognized: patt_355 = > .MASK_LOAD (_230, 8B, patt_54, 0); > > but also as a scatter/gather: > > pr118950.c:9:21: note: gather/scatter pattern: detected: _152 = .MASK_LOAD > (_230, 8B, _229, 0); > pr118950.c:9:21: note: gather_scatter pattern recognized: patt_375 = > .MASK_LEN_GATHER_LOAD ((sizetype) _215 + 20, _85, 1, 0, _229, 0); > > The type of _152 is _Bool but patt_375's type is unsigned char. With > unsigned char the presence of padding bits is not obvious and we should have > looked at _152's type. I suppose tree load_lhs = vect_recog_temp_ssa_var (gs_info.element_type, NULL); gimple_call_set_lhs (pattern_stmt, load_lhs); is wrong then and confuses bool patterns? vect_recog_mask_conversion_pattern simply uses lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL); gimple_call_set_lhs (pattern_stmt, lhs); so the original LHS type.