public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112435] New: [14 regression]
@ 2023-11-08  3:23 sjames at gcc dot gnu.org
  2023-11-08  3:31 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps') pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08  3:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

            Bug ID: 112435
           Summary: [14 regression]
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 56530
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56530&action=edit
gridsample_x86_avx512.cpp.ii

I'm not sure what's going on here but it works with GCC 13 and doesn't with 14,
so I figured I'd file it just in case.

The file is huge and upstream also heavily use SIMD, so it's possible there's
an issue on that side.

Reported downstream originally at https://bugs.gentoo.org/916970.

--

I can reproduce it with 'g++-14 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden -msse2 -msse -fopenmp -mavx512f -mavx512cd
-mavx512bw -mavx512dq -mavx512vl -mfma -mf16c -c gridsample_x86_avx512.cpp.ii
-O3 -c gridsample_x86_avx512.cpp.ii -march=znver2':

```
$ g++-14 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -msse
-fopenmp -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl -mfma -mf16c -c
gridsample_x86_avx512.cpp.ii -O3 -c gridsample_x86_avx512.cpp.ii -march=znver2
/tmp/ccs8OnnL.s: Assembler messages:
/tmp/ccs8OnnL.s:1906: Error: unsupported instruction `vblendps'
/tmp/ccs8OnnL.s:1907: Error: unsupported instruction `vblendps'
/tmp/ccs8OnnL.s:2358: Error: unsupported instruction `vblendps'
/tmp/ccs8OnnL.s:3250: Error: unsupported instruction `vblendps'
/tmp/ccs8OnnL.s:3251: Error: unsupported instruction `vblendps'
/tmp/ccs8OnnL.s:3661: Error: unsupported instruction `vblendps'
/tmp/ccs8OnnL.s:3663: Error: unsupported instruction `vblendps'
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231105/work/gcc-14-20231105/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran,rust --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened
14.0.0_pre20231105 p8' --with-gcc-major-version-only --enable-libstdcxx-time
--enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --enable-cet
--disable-systemtap --enable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --with-zstd --with-isl --disable-isl-version-check
--enable-default-pie --enable-host-pie --enable-host-bind-now
--enable-default-ssp --with-build-config='bootstrap-O3 bootstrap-lto
bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231105 (experimental) (Gentoo Hardened 14.0.0_pre20231105
p8)
```

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
@ 2023-11-08  3:31 ` pinskia at gcc dot gnu.org
  2023-11-08  3:32 ` sjames at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What binutils version are you using?
It could also be a binutils bug.

vblendps is just a plain avx instruction even.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
  2023-11-08  3:31 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps') pinskia at gcc dot gnu.org
@ 2023-11-08  3:32 ` sjames at gcc dot gnu.org
  2023-11-08  3:34 ` pinskia at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08  3:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> What binutils version are you using?
> It could also be a binutils bug.
> 

$ as --version
GNU assembler (Gentoo 2.41 p2) 2.41.0

> vblendps is just a plain avx instruction even.

Oh, right.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
  2023-11-08  3:31 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps') pinskia at gcc dot gnu.org
  2023-11-08  3:32 ` sjames at gcc dot gnu.org
@ 2023-11-08  3:34 ` pinskia at gcc dot gnu.org
  2023-11-08  3:35 ` pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2023-11-08

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I could not reproduce it with:
GNU C++17 (GCC) version 14.0.0 20231107 (experimental) [trunk 8b937ae0a9e]
(x86_64-pc-linux-gnu)
        compiled by GNU C version 14.0.0 20231107 (experimental) [trunk
8b937ae0a9e], GMP version 6.1.0, MPFR version 3.1.6, MPC version 1.0.3, isl
version isl-0.18-GMP

And with the following version of binutils:
GNU assembler version 2.35.2 (x86_64-redhat-linux) using BFD version version
2.35.2-37.el9

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-11-08  3:34 ` pinskia at gcc dot gnu.org
@ 2023-11-08  3:35 ` pinskia at gcc dot gnu.org
  2023-11-08  3:36 ` pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|WAITING                     |UNCONFIRMED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh wait I can reproduce it ...

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-11-08  3:35 ` pinskia at gcc dot gnu.org
@ 2023-11-08  3:36 ` pinskia at gcc dot gnu.org
  2023-11-08  3:38 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
        vblendps        $240, %ymm17, %ymm0, %ymm2
        vblendps        $240, %ymm1, %ymm17, %ymm17
        vshuff32x4      $1, %ymm1, %ymm0, %ymm0

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-11-08  3:36 ` pinskia at gcc dot gnu.org
@ 2023-11-08  3:38 ` pinskia at gcc dot gnu.org
  2023-11-08  3:54 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#(insn:TI 48 192 56 6 (set (reg:V8SF 22 xmm2 [445])
#        (vec_select:V8SF (vec_concat:V16SF (reg:V8SF 20 xmm0 [orig:442
MEM[(__m256_u * {ref-all})gridptr_432] ] [442])
#                (reg:V8SF 53 xmm17 [orig:443 MEM[(__m256_u *
{ref-all})gridptr_432 + 32B] ] [443]))
#            (parallel [
#                    (const_int 0 [0])
#                    (const_int 1 [0x1])
#                    (const_int 2 [0x2])
#                    (const_int 3 [0x3])
#                    (const_int 12 [0xc])
#                    (const_int 13 [0xd])
#                    (const_int 14 [0xe])
#                    (const_int 15 [0xf])
#                ])))
"/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/avxintrin.h":698:10 7346
{avx512vl_shuf_f32x4_1}
#     (nil))
        vblendps        $240, %ymm17, %ymm0, %ymm2      # 48    [c=4 l=7] 
avx512vl_shuf_f32x4_1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-11-08  3:38 ` pinskia at gcc dot gnu.org
@ 2023-11-08  3:54 ` pinskia at gcc dot gnu.org
  2023-11-08  3:56 ` sjames at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection,
                   |                            |needs-reduction
   Target Milestone|---                         |14.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

The problem is:
  if (INTVAL (operands[3]) == 2 && !<mask_applied>)
    return "vblendps\t{$240, %2, %1, %0|%0, %1, %2, 240}";


vblendps only supports up to %ymm15 ...

The error message is not so good though.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-11-08  3:54 ` pinskia at gcc dot gnu.org
@ 2023-11-08  3:56 ` sjames at gcc dot gnu.org
  2023-11-08  3:56 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08  3:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #8 from Sam James <sjames at gcc dot gnu.org> ---
I've kicked off a reduction although I'm not really sure how it's going to turn
out...

I'll do a bisect while I wait.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-11-08  3:56 ` sjames at gcc dot gnu.org
@ 2023-11-08  3:56 ` pinskia at gcc dot gnu.org
  2023-11-08  3:59 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like it was introduced with:
r14-96-gc2dac2e5fbbcdd

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps')
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-11-08  3:56 ` pinskia at gcc dot gnu.org
@ 2023-11-08  3:59 ` pinskia at gcc dot gnu.org
  2023-11-08  4:45 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd sjames at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08  3:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Sam James from comment #8)
> I've kicked off a reduction although I'm not really sure how it's going to
> turn out...
> 
> I'll do a bisect while I wait.

No need for a reduction and/or bisect, I have one:
```
#include<x86intrin.h>

__m256i f(__m256i a, __m256i  b)
{
        register __m256i t __asm__("ymm17") =a;
        asm("":"+v"(t));
        return _mm256_shuffle_i32x4 (t, b, 2);
}
```

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-11-08  3:59 ` pinskia at gcc dot gnu.org
@ 2023-11-08  4:45 ` sjames at gcc dot gnu.org
  2023-11-08  6:08 ` haochen.jiang at intel dot com
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08  4:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=31043

--- Comment #11 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> [...]
> 
> vblendps only supports up to %ymm15 ...
> 
> The error message is not so good though.

Filed gas bug for a better error message at
https://sourceware.org/bugzilla/show_bug.cgi?id=31043

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2023-11-08  4:45 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd sjames at gcc dot gnu.org
@ 2023-11-08  6:08 ` haochen.jiang at intel dot com
  2023-11-08  8:07 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: haochen.jiang at intel dot com @ 2023-11-08  6:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #12 from Haochen Jiang <haochen.jiang at intel dot com> ---
Seems like we should prevent the optimization in that commit to register
x/ymm16+.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2023-11-08  6:08 ` haochen.jiang at intel dot com
@ 2023-11-08  8:07 ` rguenth at gcc dot gnu.org
  2023-11-10 15:11 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-08  8:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Target|                            |x86_64-*-*

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2023-11-08  8:07 ` rguenth at gcc dot gnu.org
@ 2023-11-10 15:11 ` jakub at gcc dot gnu.org
  2023-11-10 19:17 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-10 15:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 56553
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56553&action=edit
gcc14-pr112435.patch

Untested fix.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2023-11-10 15:11 ` jakub at gcc dot gnu.org
@ 2023-11-10 19:17 ` pinskia at gcc dot gnu.org
  2023-11-14  7:15 ` cvs-commit at gcc dot gnu.org
  2023-11-14  7:23 ` jakub at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-10 19:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #13)
> Created attachment 56553 [details]
> gcc14-pr112435.patch
> 
> Untested fix.

https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635760.html ?

But I think your patch might be better ... though that includes more testcases.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2023-11-10 19:17 ` pinskia at gcc dot gnu.org
@ 2023-11-14  7:15 ` cvs-commit at gcc dot gnu.org
  2023-11-14  7:23 ` jakub at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-14  7:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:6043bfbd89b335dd10f093a653ee58c5b1e08ed3

commit r14-5430-g6043bfbd89b335dd10f093a653ee58c5b1e08ed3
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Nov 14 08:11:44 2023 +0100

    i386: Don't optimize vshuf{i,f}{32x4,64x2} and vperm{i,f}128 to vblendps
for %ymm16+ [PR112435]

    The vblendps instruction is only VEX encoded, not EVEX, so can't be used if
    there are %ymm16+ or EGPR registers involved.

    2023-11-14  Jakub Jelinek  <jakub@redhat.com>
                Hu, Lin1  <lin1.hu@intel.com>

            PR target/112435
            * config/i386/sse.md (avx512vl_shuf_<shuffletype>32x4_1<mask_name>,
            <mask_codefor>avx512dq_shuf_<shuffletype>64x2_1<mask_name>): Add
            alternative with just x instead of v constraints and xjm instead of
            vm and use vblendps as optimization only with that alternative.

            * gcc.target/i386/avx512vl-pr112435-1.c: New test.
            * gcc.target/i386/avx512vl-pr112435-2.c: New test.
            * gcc.target/i386/avx512vl-pr112435-3.c: New test.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd
  2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2023-11-14  7:15 ` cvs-commit at gcc dot gnu.org
@ 2023-11-14  7:23 ` jakub at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-14  7:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112435

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-11-14  7:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-08  3:23 [Bug target/112435] New: [14 regression] sjames at gcc dot gnu.org
2023-11-08  3:31 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX512 when building ncnn? (Error: unsupported instruction `vblendps') pinskia at gcc dot gnu.org
2023-11-08  3:32 ` sjames at gcc dot gnu.org
2023-11-08  3:34 ` pinskia at gcc dot gnu.org
2023-11-08  3:35 ` pinskia at gcc dot gnu.org
2023-11-08  3:36 ` pinskia at gcc dot gnu.org
2023-11-08  3:38 ` pinskia at gcc dot gnu.org
2023-11-08  3:54 ` pinskia at gcc dot gnu.org
2023-11-08  3:56 ` sjames at gcc dot gnu.org
2023-11-08  3:56 ` pinskia at gcc dot gnu.org
2023-11-08  3:59 ` pinskia at gcc dot gnu.org
2023-11-08  4:45 ` [Bug target/112435] [14 regression] GCC generates assembly which gas rejects with AVX when building ncnn (Error: unsupported instruction `vblendps') since r14-96-gc2dac2e5fbbcdd sjames at gcc dot gnu.org
2023-11-08  6:08 ` haochen.jiang at intel dot com
2023-11-08  8:07 ` rguenth at gcc dot gnu.org
2023-11-10 15:11 ` jakub at gcc dot gnu.org
2023-11-10 19:17 ` pinskia at gcc dot gnu.org
2023-11-14  7:15 ` cvs-commit at gcc dot gnu.org
2023-11-14  7:23 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).