https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95969
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:03312cbd54f337dfb25be356a1d1abc9925c6c03 commit r12-3493-g03312cbd54f337dfb25be356a1d1abc9925c6c03 Author: Andrew Pinski <apin...@marvell.com> Date: Thu Sep 2 07:08:22 2021 +0000 [aarch64] Fix target/95969: __builtin_aarch64_im_lane_boundsi interferes with gimple This patch adds simple folding of __builtin_aarch64_im_lane_boundsi where we are not going to error out. It fixes the problem by the removal of the function from the IR. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. gcc/ChangeLog: PR target/95969 * config/aarch64/aarch64-builtins.c (aarch64_fold_builtin_lane_check): New function. (aarch64_general_fold_builtin): Handle AARCH64_SIMD_BUILTIN_LANE_CHECK. (aarch64_general_gimple_fold_builtin): Likewise. gcc/testsuite/ChangeLog: PR target/95969 * gcc.target/aarch64/lane-bound-1.c: New test. * gcc.target/aarch64/lane-bound-2.c: New test.