]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Mark __builtin_aarch64_im_lane_boundsi as leaf and nothrow [PR117665]
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 19 Nov 2024 08:19:57 +0000 (00:19 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 29 Nov 2024 20:09:09 +0000 (12:09 -0800)
commitaf974df94751195ce72e86d7b88e5d5444375b45
treed558658782bf2bdfca99c5183eae20da72c3f468
parente79583cef924f5fb5de551bd61da7b5fdee5c690
aarch64: Mark __builtin_aarch64_im_lane_boundsi as leaf and nothrow [PR117665]

__builtin_aarch64_im_lane_boundsi is known not to throw or call back into another
function since it will either folded into an NOP or will produce a compiler error.

This fixes the ICE by fixing the missed optimization. It does not fix the underlying
issue with fold_marked_statements; which I filed as PR 117668.

Built and tested for aarch64-linux-gnu.

PR target/117665

gcc/ChangeLog:

* config/aarch64/aarch64-builtins.cc (aarch64_init_simd_builtin_functions):
Pass nothrow and leaf as attributes to aarch64_general_add_builtin for
__builtin_aarch64_im_lane_boundsi.

gcc/testsuite/ChangeLog:

* g++.target/aarch64/lane-bound-1.C: New test.
* gcc.target/aarch64/lane-bound-3.c: New test.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/config/aarch64/aarch64-builtins.cc
gcc/testsuite/g++.target/aarch64/lane-bound-1.C [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/lane-bound-3.c [new file with mode: 0644]