public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mathieu.malaterre at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106187] armhf: Miscompilation at O2 level (O0 / O1 are working)
Date: Tue, 05 Jul 2022 08:00:13 +0000	[thread overview]
Message-ID: <bug-106187-4-y8gbizmkak@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106187-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Mathieu Malaterre <mathieu.malaterre at gmail dot com> ---
(In reply to Jan Wassenberg from comment #7)
> The easiest way to reduce the amount of code in the binary is to comment out
> from mul_test.cc all the HWY_EXPORT_AND_TEST_P except the one with
> TestAllMulEven.
> 
> The actual miscompilation is probably happening within ops/emu128-inl.h.
> 
> You can further reduce instantiations by replacing
> ForFloatTypes(ForPartialVectors<TestMulAdd>());
> with
> TestMulAdd()(float(), FixedTag<float, 4>());
> 
> That gets us down to a fairly minimal single TU (mul_test.cc).

Bingo !

Program received signal SIGABRT, Aborted.
0xb6cafe86 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) bt
#0  0xb6cafe86 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0xb6cbf0e4 in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0xb6cafa16 in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#3  0x00416a2c in hwy::Abort (file=file@entry=0x43acf8
"/home/malat/highway/hwy/tests/mul_test.cc", line=line@entry=308,
format=0x43b6ec "%s, %sx%llu lane %llu mismatch: expected '%s', got '%s'.\n")
    at /home/malat/highway/hwy/targets.cc:322
#4  0x00416cbc in hwy::detail::PrintMismatchAndAbort (info=...,
expected_ptr=expected_ptr@entry=0x0, actual_ptr=0x467580,
actual_ptr@entry=0x43acf8, target_name=target_name@entry=0x43ad24 "Emu128",
    filename=0x43acf8 "/home/malat/highway/hwy/tests/mul_test.cc",
filename@entry=0xb6ff3010 "", line=line@entry=308, lane=0,
num_lanes=num_lanes@entry=4) at /home/malat/highway/hwy/tests/test_util.cc:90
#5  0x00416d54 in hwy::detail::AssertArrayEqual (info=...,
expected_void=expected_void@entry=0x467500,
actual_void=actual_void@entry=0x467580, N=N@entry=4, target_name=0x43ad24
"Emu128",
    filename=0x43acf8 "/home/malat/highway/hwy/tests/mul_test.cc", line=308) at
/home/malat/highway/hwy/tests/test_util.cc:113
#6  0x004108ae in hwy::N_EMU128::AssertVecEqual<hwy::N_EMU128::Simd<float, 4u,
0>, float, hwy::N_EMU128::Vec128<float, 4u> > (line=308, filename=0x43acf8
"/home/malat/highway/hwy/tests/mul_test.cc",
    actual=..., expected=0x467500, d=...) at
/home/malat/highway/hwy/tests/test_util-inl.h:51
#7  hwy::N_EMU128::TestMulAdd::operator()<float, hwy::N_EMU128::Simd<float, 4u,
0> > (d=..., this=<optimized out>) at
/home/malat/highway/hwy/tests/mul_test.cc:308
#8  0x0043a114 in void
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,
void>(testing::Test*, void (testing::Test::*)(), char const*) ()

  parent reply	other threads:[~2022-07-05  8:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 16:23 [Bug c++/106187] New: armhf: Miscompilation with -O2 mathieu.malaterre at gmail dot com
2022-07-04 16:37 ` [Bug c++/106187] " mathieu.malaterre at gmail dot com
2022-07-04 16:37 ` mathieu.malaterre at gmail dot com
2022-07-04 16:42 ` [Bug c++/106187] armhf: Miscompilation at all optimization levels mathieu.malaterre at gmail dot com
2022-07-04 20:19 ` pinskia at gcc dot gnu.org
2022-07-04 20:22 ` pinskia at gcc dot gnu.org
2022-07-05  7:18 ` [Bug target/106187] " mathieu.malaterre at gmail dot com
2022-07-05  7:46 ` [Bug target/106187] armhf: Miscompilation at O2 level (O0 / O1 are working) jan.wassenberg at gmail dot com
2022-07-05  8:00 ` mathieu.malaterre at gmail dot com [this message]
2022-07-07  7:50 ` mathieu.malaterre at gmail dot com
2022-07-07  8:00 ` mathieu.malaterre at gmail dot com
2022-07-07  9:38 ` rearnsha at gcc dot gnu.org
2022-07-08  9:01 ` mathieu.malaterre at gmail dot com
2022-07-08  9:01 ` mathieu.malaterre at gmail dot com
2022-07-08  9:03 ` mathieu.malaterre at gmail dot com
2022-07-08 13:50 ` rearnsha at gcc dot gnu.org
2022-07-08 13:59 ` malat at debian dot org
2022-07-08 14:16 ` rearnsha at gcc dot gnu.org
2022-07-08 14:18 ` malat at debian dot org
2022-07-08 14:51 ` rearnsha at gcc dot gnu.org
2022-07-08 15:03 ` malat at debian dot org
2022-07-08 17:24 ` rearnsha at gcc dot gnu.org
2022-07-08 17:31 ` rearnsha at gcc dot gnu.org
2022-07-08 19:27 ` jan.wassenberg at gmail dot com
2022-07-14 13:03 ` rearnsha at gcc dot gnu.org
2022-07-14 13:18 ` rearnsha at gcc dot gnu.org
2022-07-14 16:09 ` pinskia at gcc dot gnu.org
2022-07-18 15:45 ` rearnsha at gcc dot gnu.org
2022-07-18 15:48 ` rearnsha at gcc dot gnu.org
2022-07-19  7:27 ` rguenth at gcc dot gnu.org
2022-07-19  9:00 ` rearnsha at gcc dot gnu.org
2022-07-19  9:13 ` rguenth at gcc dot gnu.org
2022-07-21  9:25 ` rearnsha at gcc dot gnu.org
2022-07-22 12:52 ` rearnsha at gcc dot gnu.org
2022-07-22 13:24 ` rearnsha at gcc dot gnu.org
2022-07-25  6:12 ` rguenth at gcc dot gnu.org
2022-07-25  9:44 ` rearnsha at gcc dot gnu.org
2022-07-25  9:50 ` rguenther at suse dot de
2022-07-25  9:59 ` rearnsha at gcc dot gnu.org
2022-07-25 10:24 ` rguenth at gcc dot gnu.org
2022-07-25 10:26 ` [Bug rtl-optimization/106187] " rguenth at gcc dot gnu.org
2022-07-25 10:33 ` rearnsha at gcc dot gnu.org
2022-07-25 10:42 ` rguenth at gcc dot gnu.org
2022-07-25 10:48 ` rearnsha at gcc dot gnu.org
2022-07-25 11:03 ` rguenther at suse dot de
2022-07-25 11:05 ` rguenth at gcc dot gnu.org
2022-07-25 13:04 ` rearnsha at gcc dot gnu.org
2022-07-25 14:45 ` rguenther at suse dot de
2022-07-27 13:35 ` rearnsha at gcc dot gnu.org
2022-07-28 16:51 ` rearnsha at gcc dot gnu.org
2022-08-03  9:07 ` cvs-commit at gcc dot gnu.org
2022-08-03  9:16 ` rearnsha at gcc dot gnu.org
2022-08-10  7:06 ` malat at debian dot org
2022-08-10  7:11 ` pinskia at gcc dot gnu.org
2022-09-02  9:28 ` malat at debian dot org
2022-09-02 12:30 ` cvs-commit at gcc dot gnu.org
2022-09-02 12:32 ` rearnsha at gcc dot gnu.org
2022-09-02 14:07 ` cvs-commit at gcc dot gnu.org
2022-09-27 15:28 ` malat at debian dot org
2022-09-27 15:54 ` rearnsha at gcc dot gnu.org
2024-01-20 17:20 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106187-4-y8gbizmkak@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).