[PATCH] Enhance vec_pack_trunc for integral mode mask.

2022-01-18 Thread liuhongt via Gcc-patches
> your description above hints at that the actual modes involved in the > vec_pack_sbool_trunc are the same so the TYPE_MODE (narrow_vectype) > and TYPE_MODE (vectype) are not the actual modes participating. I think > it would be way better to fix that. > > I suppose that since we know TYPE_VECTOR

Re: [PATCH] Enhance vec_pack_trunc for integral mode mask.

2022-01-18 Thread Richard Biener via Gcc-patches
On Tue, Jan 18, 2022 at 7:26 AM liuhongt wrote: > > For testcase in PR, the patch supports QI:4 -> HI:16 pack with > multi steps(first pack QI:4 -> QI:8 through vec_pack_sbool_trunc_qi, > then pack QI:8 -> HI:16 through vec_pack_trunc_hi). > Similar for QI:2 -> HI:16 which is test4 in mask-pack-pr

[PATCH] Enhance vec_pack_trunc for integral mode mask.

2022-01-17 Thread liuhongt via Gcc-patches
For testcase in PR, the patch supports QI:4 -> HI:16 pack with multi steps(first pack QI:4 -> QI:8 through vec_pack_sbool_trunc_qi, then pack QI:8 -> HI:16 through vec_pack_trunc_hi). Similar for QI:2 -> HI:16 which is test4 in mask-pack-prefer-128.c. Bootstrapped both with and w/o '--with-arch=na