From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8990 invoked by alias); 29 Oct 2014 15:14:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8971 invoked by uid 48); 29 Oct 2014 15:14:36 -0000 From: "peter.bumbulis at ianywhere dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63678] New: __mm256_blend_epi16 only accepts 8-bit masks (should accept 16-bit) Date: Wed, 29 Oct 2014 15:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: peter.bumbulis at ianywhere dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02244.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63678 Bug ID: 63678 Summary: __mm256_blend_epi16 only accepts 8-bit masks (should accept 16-bit) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: peter.bumbulis at ianywhere dot com Created attachment 33844 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D33844&action=3Dedit .i file for repro. __mm256_blend_epi16 only accepts 8-bit masks as the 3rd parameter, not 16. = The Intel and Microsoft compilers handle this properly. $ gcc -c -mavx2 -save-temps foo.c=20 foo.c: In function =E2=80=98blend=E2=80=99: foo.c:4:46: error: the last argument must be an 8-bit immediate return _mm256_blend_epi16(a, b, 0xabcd); ^ where foo.c is #include __m256i blend(__m256i a, __m256i b) { return _mm256_blend_epi16(a, b, 0xabcd); } $ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 4.8.2-19ub= untu1' --with-bugurl=3Dfile:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=3Dc,c++,java,go,d,fortran,objc,obj-c++ --prefix=3D/usr --program-suffix=3D-4.8 --enable-shared --enable-linker-build-id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --with-gxx-include-dir=3D/usr/include/c++/4.8 --libdir=3D/usr/lib --enable-= nls --with-sysroot=3D/ --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-gnu-unique-object --disable-libmudfl= ap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=3Dgtk --enable-gtk-cairo --with-java-home=3D/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-= home --with-jvm-root-dir=3D/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=3D/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=3Damd64 --with-ecj-jar=3D/usr/share/java/eclipse-ecj.= jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --with-tune=3Dgeneric --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linu= x-gnu --target=3Dx86_64-linux-gnu Thread model: posix gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) >>From gcc-bugs-return-465224-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 29 15:18:25 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11472 invoked by alias); 29 Oct 2014 15:18:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 11418 invoked by uid 55); 29 Oct 2014 15:18:21 -0000 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/63587] [5 Regression] ICE : tree check: expected var_decl, have result_decl in add_local_variables, at tree-inline.c:4112 Date: Wed, 29 Oct 2014 15:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02245.txt.bz2 Content-length: 845 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63587 --- Comment #14 from Martin Li=C5=A1ka --- Author: marxin Date: Wed Oct 29 15:17:42 2014 New Revision: 216841 URL: https://gcc.gnu.org/viewcvs?rev=3D216841&root=3Dgcc&view=3Drev Log: PR ipa/63587 * g++.dg/ipa/pr63587-1.C: New test * g++.dg/ipa/pr63587-2.C: New test. * cgraphunit.c (cgraph_node::expand_thunk): Only VAR_DECLs are put to local declarations. * function.c (add_local_decl): Implementation moved from header file, assert introduced for tree type. * function.h: Likewise. Added: trunk/gcc/testsuite/g++.dg/ipa/pr63587-1.C trunk/gcc/testsuite/g++.dg/ipa/pr63587-2.C Modified: trunk/gcc/ChangeLog trunk/gcc/cgraphunit.c trunk/gcc/function.c trunk/gcc/function.h trunk/gcc/testsuite/ChangeLog >>From gcc-bugs-return-465225-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 29 15:19:26 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 12482 invoked by alias); 29 Oct 2014 15:19:26 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 12427 invoked by uid 48); 29 Oct 2014 15:19:22 -0000 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/63587] [5 Regression] ICE : tree check: expected var_decl, have result_decl in add_local_variables, at tree-inline.c:4112 Date: Wed, 29 Oct 2014 15:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02246.txt.bz2 Content-length: 437 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63587 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #15 from Martin Li=C5=A1ka --- Resolved. >>From gcc-bugs-return-465226-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 29 15:44:30 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 30434 invoked by alias); 29 Oct 2014 15:44:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 30399 invoked by uid 48); 29 Oct 2014 15:44:25 -0000 From: "belagod at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/63679] New: [4.9 Regression][AArch64] Failure to constant fold. Date: Wed, 29 Oct 2014 16:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: belagod at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02247.txt.bz2 Content-length: 2786 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679 Bug ID: 63679 Summary: [4.9 Regression][AArch64] Failure to constant fold. Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: belagod at gcc dot gnu.org When this piece of code is compiled with -O3 -mgeneral-regs-only int __attribute__ ((noinline)) foo () { const int a[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; int i, sum; sum = 0; for (i = 0; i < sizeof (a) / sizeof (*a); i++) sum += a[i]; return sum; } 4.9 gcc generates: foo: sub sp, sp, #32 mov w0, 28 add sp, sp, 32 ret .size foo, .-foo .ident "GCC: (unknown) 4.9.2 20140930 (prerelease)" 5.0 generates: foo: adrp x0, .LANCHOR0 sub sp, sp, #32 add x0, x0, :lo12:.LANCHOR0 ldr x7, [x0] ldr x6, [x0, 16] ldr x1, [x0, 8] sbfx x5, x7, 32, 32 ldr x0, [x0, 24] add w2, w6, w7 str x0, [sp, 24] mov x4, x1 str x1, [sp, 8] sbfx x1, x6, 32, 32 ldr x3, [sp, 24] add w1, w1, w5 add w1, w1, w2 str x7, [sp] add w0, w3, w4 sbfx x4, x4, 32, 32 sbfx x3, x3, 32, 32 add w0, w0, w1 add w3, w4, w3 str x6, [sp, 16] add w0, w3, w0 add sp, sp, 32 ret .size foo, .-foo .section .rodata .align 3 .LANCHOR0 = . + 0 .LC0: .word 0 .word 1 .word 2 .word 3 .word 4 .word 5 .word 6 .word 7 .ident "GCC: (unknown) 5.0.0 20141023 (experimental)" Constant-folding seems to have got a bit messed up. I've observed this only on aarch64-none-elf-gcc. 5.0 x86_64 seems to work fine. foo: .LFB0: .cfi_startproc movl $28, %eax ret .cfi_endproc .LFE0: .size foo, .-foo .section .text.unlikely .LCOLDE0: .text .LHOTE0: .ident "GCC: (GNU) 5.0.0 20141023 (experimental)" .section .note.GNU-stack,"",@progbits Looks like a aarch64-specific backend issue. $ aarch64-none-elf-gcc -v Target: aarch64-none-elf Configured with: /work/dev/arm/src/gcc/configure --target=aarch64-none-elf --prefix=/work/dev/arm/bin//install --with-gmp=/work/dev/arm/bin//host-tools --with-mpfr=/work/dev/arm/bin//host-tools --with-mpc=/work/dev/arm/bin//host-tools --with-cloog=/work/dev/arm/bin//host-tools --with-isl=/work/dev/arm/bin//host-tools --with-pkgversion=unknown --disable-shared --disable-nls --disable-threads --disable-tls --enable-checking=yes --enable-languages=c,c++ --with-newlib Thread model: single gcc version 5.0.0 20141023 (experimental) (unknown)