From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1E6713858D20; Mon, 20 May 2024 10:07:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E6713858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716199650; bh=kBy61kZoJdfeaRojwxbYYHiahNVgv3VSYzpbcnLQ6d0=; h=From:To:Subject:Date:From; b=WNmzNfBmqU5JMa089b95QepyddJICxnyrwmYpEhmJu3qpiKQDG4SnHmj9Q0S56d8X B0hYaNJvyS0O8DikUQil9BJ2NPwSl9OCmmU2dpQtxoMiEsimYCTWQhsojhWR/0tyZC m88TaC8nzDuPyVABUyQlhc6KLEiltax3wV3EMDnQ= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115161] New: [15 Regression] highway-1.0.7 miscompilation of some SSE2 intrinsics Date: Mon, 20 May 2024 10:07:29 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115161 Bug ID: 115161 Summary: [15 Regression] highway-1.0.7 miscompilation of some SSE2 intrinsics Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Created attachment 58250 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58250&action=3Dedit bug.cc Initially observed at r15-656-ge1a7e2c54d52d0 on highway-1.0.7 where HwyConvertTestGroup/HwyConvertTest.TestAllF2IPromoteTo/SSE2 was failing as: [ RUN ] HwyConvertTestGroup/HwyConvertTest.TestAllF2IPromoteTo/SSE2 i64x2 expect [0+ ->]: 0x7fffffffffffffff,0x7fffffffffffffff, i64x2 actual [0+ ->]: 0x7fffffff00000000,0x7fffffff00000000, Abort at convert_test.cc:41: SSE2, i64x2 lane 0 mismatch: expected '0x7fffffffffffffff', got '0x7fffffff00000000'. I extracted it down to attached bug.cc. It's 5kb of straightforward self-contained code. Crashing: $ g++-15 bug.cc -o bug -O0 && ./bug exponent_adj(i): 0x00002000000020 0x00002000000020 adj_v(f): 0x4f8000004f800000 0x4f8000004f800000 lo64_or_mask(i): 0xffffffffffffffff 0xffffffffffffffff i(f): 0x5f8000005f800000 0x5f8000005f800000 expected(i): 0xffffffffffffffff 0xffffffffffffffff actual(i): 0xffffffffffffffff 0xffffffffffffffff Expected example: $ g++-15 bug.cc -o bug -O2 && ./bug exponent_adj(i): 0x00002000000020 0x00002000000020 adj_v(f): 0x4f8000004f800000 0x4f8000004f800000 lo64_or_mask(i): 0000000000000000 0000000000000000 i(f): 0x5f8000005f800000 0x5f8000005f800000 expected(i): 0xffffffffffffffff 0xffffffffffffffff actual(i): 0000000000000000 0000000000000000 Illegal instruction (core dumped) $ g++ -v Using built-in specs. COLLECT_GCC=3D/<>/gcc-15.0.0/bin/g++ COLLECT_LTO_WRAPPER=3D/<>/gcc-15.0.0/libexec/gcc/x86_64-unknown-linux-= gnu/15.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../source/configure --prefix=3D/<>/gcc-15.0.0 --with-gmp-include=3D/<>/gmp-6.3.0-dev/include --with-gmp-lib=3D/<>/gmp-6.3.0/lib --with-mpfr-include=3D/<>/mpfr-4.2.1-dev/include --with-mpfr-lib=3D/<>/mpfr-4.2.1/lib --with-mpc=3D/<>/libmpc-1.3.1 --with-native-system-header-dir=3D/<>/glibc-2.39-52-dev/include --with-build-sysroot=3D/ --with-gxx-include-dir=3D/<>/gcc-15.0.0/include/c++/15.0.0/ --program-prefix=3D --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=3Drelease --enable-static --enable-languages=3Dc,c++ --disable-multilib --enable-plug= in --disable-libcc1 --with-isl=3D/<>/isl-0.20 --disable-bootstrap --build=3Dx86_64-unknown-linux-gnu --host=3Dx86_64-unknown-linux-gnu --target=3Dx86_64-unknown-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 99999999 (experimental) (GCC)=