[PATCH] [x86] Fix unrecognizable insn due to illegal immediate_operand (const_int 255) of QImode.

2022-11-28 Thread liuhongt via Gcc-patches
For __builtin_ia32_vec_set_v16qi (a, -1, 2) with !flag_signed_char. it's transformed to __builtin_ia32_vec_set_v16qi (_4, 255, 2) in the gimple, and expanded to (const_int 255) in the rtl. But for immediate_operand, it expects (const_int 255) to be signed extended to (const_int -1). The mismatch ca

Re: [PATCH] [x86] Fix unrecognizable insn due to illegal immediate_operand (const_int 255) of QImode.

2022-11-28 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 28, 2022 at 9:06 PM liuhongt wrote: > > For __builtin_ia32_vec_set_v16qi (a, -1, 2) with > !flag_signed_char. it's transformed to > __builtin_ia32_vec_set_v16qi (_4, 255, 2) in the gimple, > and expanded to (const_int 255) in the rtl. But for immediate_operand, > it expects (const_int

Re: [PATCH] [x86] Fix unrecognizable insn due to illegal immediate_operand (const_int 255) of QImode.

2022-11-29 Thread H.J. Lu via Gcc-patches
On Mon, Nov 28, 2022 at 11:04 PM Hongtao Liu wrote: > > On Mon, Nov 28, 2022 at 9:06 PM liuhongt wrote: > > > > For __builtin_ia32_vec_set_v16qi (a, -1, 2) with > > !flag_signed_char. it's transformed to > > __builtin_ia32_vec_set_v16qi (_4, 255, 2) in the gimple, > > and expanded to (const_int 2

Re: [PATCH] [x86] Fix unrecognizable insn due to illegal immediate_operand (const_int 255) of QImode.

2022-11-29 Thread Hongtao Liu via Gcc-patches
On Wed, Nov 30, 2022 at 3:12 AM H.J. Lu wrote: > > On Mon, Nov 28, 2022 at 11:04 PM Hongtao Liu wrote: > > > > On Mon, Nov 28, 2022 at 9:06 PM liuhongt wrote: > > > > > > For __builtin_ia32_vec_set_v16qi (a, -1, 2) with > > > !flag_signed_char. it's transformed to > > > __builtin_ia32_vec_set_v1