Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-12-02 Thread Hongtao Liu via Gcc-patches
On Thu, Dec 3, 2020 at 3:11 AM Jeff Law wrote: > > > > On 11/25/20 9:47 PM, Hongtao Liu wrote: > > On Wed, Nov 25, 2020 at 7:37 PM Jakub Jelinek wrote: > >> On Wed, Nov 25, 2020 at 07:32:44PM +0800, Hongtao Liu wrote: > >>> Update patch: > >>> 1. ix86_expand_special_args_builtin is used for

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-12-02 Thread Jeff Law via Gcc-patches
On 11/25/20 9:47 PM, Hongtao Liu wrote: > On Wed, Nov 25, 2020 at 7:37 PM Jakub Jelinek wrote: >> On Wed, Nov 25, 2020 at 07:32:44PM +0800, Hongtao Liu wrote: >>> Update patch: >>> 1. ix86_expand_special_args_builtin is used for expanding mask load >>> intrinsics, this function will always

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-25 Thread Hongtao Liu via Gcc-patches
On Wed, Nov 25, 2020 at 7:37 PM Jakub Jelinek wrote: > > On Wed, Nov 25, 2020 at 07:32:44PM +0800, Hongtao Liu wrote: > > Update patch: > > 1. ix86_expand_special_args_builtin is used for expanding mask load > > intrinsics, this function will always convert the constant mask > > operands into

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 25, 2020 at 07:32:44PM +0800, Hongtao Liu wrote: > Update patch: > 1. ix86_expand_special_args_builtin is used for expanding mask load > intrinsics, this function will always convert the constant mask > operands into reg. So for the situation of all-ones mask, keep this > constant,

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-25 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 24, 2020 at 9:00 PM Jakub Jelinek wrote: > > On Tue, Nov 24, 2020 at 10:36:49AM +0800, Hongtao Liu via Gcc-patches wrote: > > > > * gcc.target/i386/pr97642-2.c: New test. > > > So in the BZ Jakub asked for the all-ones mask case to be specially > > > handled to emit a normal

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 24, 2020 at 10:36:49AM +0800, Hongtao Liu via Gcc-patches wrote: > > > * gcc.target/i386/pr97642-2.c: New test. > > So in the BZ Jakub asked for the all-ones mask case to be specially > > handled to emit a normal load. I don't see where we're handling that. > > ISTM that we'd

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-23 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 24, 2020 at 4:27 AM Jeff Law wrote: > > > > On 11/4/20 2:19 AM, Hongtao Liu via Gcc-patches wrote: > > Hi: > > When programmers explicitly use mask loaded intrinsics, don't > > transform the instruction to vpblend{b,w,d,q} since If mem_addr points > > to a memory region with less

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-23 Thread Jeff Law via Gcc-patches
On 11/4/20 2:19 AM, Hongtao Liu via Gcc-patches wrote: > Hi: > When programmers explicitly use mask loaded intrinsics, don't > transform the instruction to vpblend{b,w,d,q} since If mem_addr points > to a memory region with less than whole vector size of accessible > memory, the mask would

[PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-04 Thread Hongtao Liu via Gcc-patches
Hi: When programmers explicitly use mask loaded intrinsics, don't transform the instruction to vpblend{b,w,d,q} since If mem_addr points to a memory region with less than whole vector size of accessible memory, the mask would prevent reading the inaccessible bytes which could avoid fault.