aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-iterator.cc
diff options
context:
space:
mode:
authorAndrew Carlotti <andrew.carlotti@arm.com>2022-07-13 09:01:51 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2022-07-13 09:01:51 +0100
commite9cad1e582950d129aba3465b65c2231f94bb6c0 (patch)
treef937c8637e8e1db45766125626b3ad54cdb00b7d /gcc/gimple-iterator.cc
parentc479c40f8c8fee0fb70e8a365b61c55739f448e1 (diff)
downloadgcc-e9cad1e582950d129aba3465b65c2231f94bb6c0.zip
gcc-e9cad1e582950d129aba3465b65c2231f94bb6c0.tar.gz
gcc-e9cad1e582950d129aba3465b65c2231f94bb6c0.tar.bz2
aarch64: Don't return invalid GIMPLE assign statements
aarch64_general_gimple_fold_builtin doesn't check whether the LHS of a function call is null before converting it to an assign statement. To avoid returning an invalid GIMPLE statement in this case, we instead assign the expression result to a new (unused) variable. This change only affects code that: 1) Calls an intrinsic function that has no side effects; 2) Does not use or store the value returned by the intrinsic; 3) Uses parameters that prevent the front-end eliminating the call prior to gimplification. The ICE is unlikely to have occurred in the wild, as it relies on the presence of a redundant intrinsic call. gcc/ChangeLog: * config/aarch64/aarch64-builtins.cc (aarch64_general_gimple_fold_builtin): Add fixup for invalid GIMPLE. gcc/testsuite/ChangeLog: * gcc.target/aarch64/advsimd-intrinsics/ignored_return_1.c: New test.
Diffstat (limited to 'gcc/gimple-iterator.cc')
0 files changed, 0 insertions, 0 deletions