Message ID | a1e27786-8c0d-9fb8-ef42-3c936eec770a@acm.org |
---|---|
State | New |
Headers | show |
Series | i386: Fix array index in expander | expand |
On Fri, Sep 11, 2020 at 11:19 PM Nathan Sidwell <nathan@acm.org> wrote: > > I noticed a compiler warning about out-of-bound access. Fixed thusly. > > gcc/ > * config/i386/sse.md (mov<mode>): Fix operand indices. > > pushed as obvious looks like wrong-code as well so could you push to affected branches? Thanks, Richard. > -- > Nathan Sidwell
On Mon, Sep 14, 2020 at 3:51 PM Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > On Fri, Sep 11, 2020 at 11:19 PM Nathan Sidwell <nathan@acm.org> wrote: > > > > I noticed a compiler warning about out-of-bound access. Fixed thusly. > > > > gcc/ > > * config/i386/sse.md (mov<mode>): Fix operand indices. > > > > pushed as obvious > > looks like wrong-code as well so could you push to affected branches? > GCC11 and GCC10 are affected. > Thanks, > Richard. > > > -- > > Nathan Sidwell
On 9/14/20 6:10 AM, Hongtao Liu wrote: > On Mon, Sep 14, 2020 at 3:51 PM Richard Biener via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> On Fri, Sep 11, 2020 at 11:19 PM Nathan Sidwell <nathan@acm.org> wrote: >>> >>> I noticed a compiler warning about out-of-bound access. Fixed thusly. >>> >>> gcc/ >>> * config/i386/sse.md (mov<mode>): Fix operand indices. >>> >>> pushed as obvious >> >> looks like wrong-code as well so could you push to affected branches? >> > > GCC11 and GCC10 are affected. pushed to 10
diff --git i/gcc/config/i386/sse.md w/gcc/config/i386/sse.md index a728b979f01..a784346a23b 100644 --- i/gcc/config/i386/sse.md +++ w/gcc/config/i386/sse.md @@ -23491,7 +23491,7 @@ (define_expand "mov<mode>" (match_operand:MASK_DWI 1 "nonimmediate_operand"))] "TARGET_AVX512VP2INTERSECT" { - if (MEM_P (operands[1]) && MEM_P (operands[2])) + if (MEM_P (operands[0]) && MEM_P (operands[1])) operands[1] = force_reg (<MODE>mode, operands[1]); })