From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97CB23858C41; Wed, 17 May 2023 08:42:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97CB23858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684312958; bh=V5g0kqfXFvf7OiAYat6m1LIQI6309uuvVDj4oBnmknw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KdhCCjSDEEh1sZraJRou8maGIM9PvsZGjxwtpjNapvCOP+bWxC3/6MfsvCcWFFJZX tyTlQPuSsalI2sGWrmlyoR/EKs/mMJaVeJSRTQiaaWVmTgjUICxNmQGTmINwq+1vkZ I2m1wpI4JJSqZAZa2A2pLkd3Vy5KH2L6W1dmZkQo= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109811] libxjl 0.7 is a lot slower in GCC 13.1 vs Clang 16 Date: Wed, 17 May 2023 08:42:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cc everconfirmed bug_status cf_reconfirmed_on 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109811 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-05-17 --- Comment #4 from Jan Hubicka --- Confirmed. LTO is not necessary to reproduce the differnce. I got libjxl and the test jpeg file from Phoronix testuiste and configure c= lang build with: CC=3Dclang CXX=3Dclang++ CFLAGS=3D"-O3 -g -march=3Dnative -fno-exception= s" CXXFLAGS=3D"-O3 -g -march=3Dnative -fno-exceptions" cmake -DCMAKE_C_FLAGS_RELEASE=3D"$CFLAGS -DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE=3D"$= CXXFLAGS -DNDEBUG" -DBUILD_TESTING=3DOFF .. and CFLAGS=3D"-O3 -g -march=3Dnative -fno-exceptions" CXXFLAGS=3D"-O3 -g=20= =20 -march=3Dnative -fno-exceptions" cmake -DCMAKE_C_FLAGS_RELEASE=3D"$CFLAGS -= DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE=3D"$CXXFLAGS -DNDEBUG" -DBUILD_TESTING=3DOFF .. jh@ryzen3:~/.phoronix-test-suite/installed-tests/pts/jpegxl-1.5.0> ./libjxl-0.7.0/build-gcc/tools/cjxl sample-photo-6000x4000.JPG --quality=3D= 90 --lossless_jpeg=3D0 JPEG XL encoder v0.7.0 [AVX2] No output file specified. Encoding will be performed, but the result will be discarded. Read 6000x4000 image, 7837694 bytes, 926.0 MP/s Encoding [Container | VarDCT, d1.000, effort: 7 | 29424-byte Exif],=20 Compressed to 2288431 bytes including container (0.763 bpp). 6000 x 4000, 11.12 MP/s [11.12, 11.12], 1 reps, 16 threads. jh@ryzen3:~/.phoronix-test-suite/installed-tests/pts/jpegxl-1.5.0> ./libjxl-0.7.0/build-gcc/tools/cjxl sample-photo-6000x4000.JPG --quality=3D= 90 --lossless_jpeg=3D0 test JPEG XL encoder v0.7.0 [AVX2] Read 6000x4000 image, 7837694 bytes, 926.5 MP/s Encoding [Container | VarDCT, d1.000, effort: 7 | 29424-byte Exif],=20 Compressed to 2288431 bytes including container (0.763 bpp). 6000 x 4000, 11.09 MP/s [11.09, 11.09], 1 reps, 16 threads. jh@ryzen3:~/.phoronix-test-suite/installed-tests/pts/jpegxl-1.5.0> ./libjxl-0.7.0/build-gcc/tools/cjxl sample-photo-6000x4000.JPG --quality=3D= 90 --lossless_jpeg=3D0 test JPEG XL encoder v0.7.0 [AVX2] Read 6000x4000 image, 7837694 bytes, 925.6 MP/s Encoding [Container | VarDCT, d1.000, effort: 7 | 29424-byte Exif],=20 Compressed to 2288431 bytes including container (0.763 bpp). 6000 x 4000, 11.12 MP/s [11.12, 11.12], 1 reps, 16 threads. jh@ryzen3:~/.phoronix-test-suite/installed-tests/pts/jpegxl-1.5.0> ./libjxl-0.7.0/build-clang/tools/cjxl sample-photo-6000x4000.JPG --quality= =3D90 --lossless_jpeg=3D0 test JPEG XL encoder v0.7.0 [AVX2] Read 6000x4000 image, 7837694 bytes, 924.6 MP/s Encoding [Container | VarDCT, d1.000, effort: 7 | 29424-byte Exif],=20 Compressed to 2288430 bytes including container (0.763 bpp). 6000 x 4000, 15.17 MP/s [15.17, 15.17], 1 reps, 16 threads. jh@ryzen3:~/.phoronix-test-suite/installed-tests/pts/jpegxl-1.5.0> ./libjxl-0.7.0/build-clang/tools/cjxl sample-photo-6000x4000.JPG --quality= =3D90 --lossless_jpeg=3D0 test JPEG XL encoder v0.7.0 [AVX2] Read 6000x4000 image, 7837694 bytes, 922.4 MP/s Encoding [Container | VarDCT, d1.000, effort: 7 | 29424-byte Exif],=20 Compressed to 2288430 bytes including container (0.763 bpp). 6000 x 4000, 15.18 MP/s [15.18, 15.18], 1 reps, 16 threads. So GCC does 11MB/s while clang 15MB/s=