Hi, The following test: #include "arm_sve.h" svint8_t test_s8(int8_t *x) { return svld1rq_s8 (svptrue_b8 (), &x[0]); } ICE's with -march=armv8.2-a+sve -O1 -fno-tree-ccp -fno-tree-forwprop: during GIMPLE pass: fre pr107920.c: In function ‘test_s8’: pr107920.c:7:1: internal compiler error: in execute_todo, at passes.cc:2140 7 | } | ^ 0x7b03d0 execute_todo ../../gcc/gcc/passes.cc:2140 because of incorrect handling of virtual operands in svld1rq_impl::fold: # VUSE <.MEM> _5 = MEM [(signed char * {ref-all})x_3(D)]; _4 = VEC_PERM_EXPR <_5, _5, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }>; # VUSE <.MEM_2(D)> return _4; The attached patch tries to fix the issue by building the replacement statements in gimple_seq, and passing it to gsi_replace_with_seq_vops, which resolves the ICE, and results in: : # VUSE <.MEM_2(D)> _5 = MEM [(signed char * {ref-all})x_3(D)]; _4 = VEC_PERM_EXPR <_5, _5, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }>; # VUSE <.MEM_2(D)> return _4; Bootstrapped+tested on aarch64-linux-gnu. OK to commit ? Thanks, Prathamesh