aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2025-03-26 15:56:18 +0000
committerRichard Earnshaw <rearnsha@arm.com>2025-03-27 10:54:23 +0000
commitb631ff45f231db55b28b4c92cf1a1b46b3638ddd (patch)
tree2c17bdf98c74ae55cba6a1dc99e10ac830ffad16 /libcpp
parent271745bafafbf3316d01ceb6430d67b894129a4c (diff)
downloadgcc-b631ff45f231db55b28b4c92cf1a1b46b3638ddd.zip
gcc-b631ff45f231db55b28b4c92cf1a1b46b3638ddd.tar.gz
gcc-b631ff45f231db55b28b4c92cf1a1b46b3638ddd.tar.bz2
arm: don't vectorize fmaxf() unless unsafe math opts are enabled
This test has presumably been failing since vectorization was enabled at -O2. I suspect part of the reason this wasn't picked up sooner is that the test is a hybrid execution/scan-assembler test and the execution part requires appropriate hardware. The problem is that we are vectorizing an expansion of fmaxf() when the vector version of the instruction does not preserve denormal values. This means we should only apply this optimization when -funsafe-math-optimizations is enabled. This fix does a few things: - Moves the expand pattern to vec-common.md. Although I haven't changed its behaviour (beyond fixing the bug), this should really be enabled for MVE as well (but that will need to wait for gcc-16 since the MVE code needs some additional changes first). - Adds support for HF mode vectors. - splits the test that was exposing the bug into two parts: an executable test and a scan-assembler test. The scan-assembler version is more widely enabled, since it does not require a suitable executable environment. gcc/ChangeLog: * config/arm/neon.md (<fmaxmin><mode>3): Move pattern from here... * config/arm/vec-common.md (<fmaxmin><mode>3): ... to here. Convert to define_expand and disable the pattern when denormal values might get truncated to zero. Iterate on VF to add V4HF and V8HF variants. gcc/testsuite/ChangeLog: * gcc.target/arm/fmaxmin.c: Move scan-assembler checks to ... * gcc.target/arm/fmaxmin-2.c: ... here. New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions