https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107920
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I tried with (same options): void f (void) { int t = 16; int t1 = 4; int t2 = 8; int t3 = 0; __builtin_aarch64_im_lane_boundsi (t, t1, t3); } But since we are removing the vdef via unlink_stmt_vdef (stmt); and not replacing it with a new load it works just fine. I am now trying to remember we had this issue before but I can't remember the solution ...