https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107096
--- Comment #12 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 15 Feb 2023, crazylht at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107096 > > --- Comment #11 from Hongtao.liu <crazylht at gmail dot com> --- > > > > > There's no other way to do N bit to two N/2 bit hi/lo (un)packing > > (there's a 2x N/2 bit -> N bit operation, for whatever reason). > > There's also no way to transform the d rgroup mask into the > > f rgroup mask for the first example aka duplicate bits in place, > > { b0, b1, b2, ... bN } -> { b0, b0, b1, b1, b2, b2, ... bN, bN }, > > nor the reverse. > > > > Can we just do VIEW_CONVERT_EXPR for vectype instead of mask_type. > .i.e > we can do VCE to tranform V8SI to V16HI, then use mask_load for V16HI with > same > mask {b0, b0, b1, b1, b2, b2, .}, then VCE it to back to V8SI, it should be ok > as long as duplicated bits in place.(or VCE V16HI to V8SI then use mask {b0, > b1, b2, ..., bN}, and VCE V8SI back to V16HI after masked load/move). Hmm, yes, if we arrange for the larger mask to be available that would work for loads and stores I guess. It wouldn't work for arithmetic cond_* IFNs though. It's also going to be a bit tricky within the masking framework - I'm going to see whether that works though, it might be a nice way to avoid an excessive number of masks for integer code at least.