https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121649
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 CC| |jakub at gcc dot gnu.org, | |ktkachov at gcc dot gnu.org Summary|[16 Regression] wrong code |[16 Regression] wrong code |at -O2 with large number of |with _BitInt() conversions |arguments |(?) at -O2 since r16-2382 Keywords|needs-bisection | Component|target |tree-optimization Last reconfirmed|2025-08-24 00:00:00 | --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Started with r16-2382-gf87b632f98dc6d5cf8ed75d57d15adb8d7ffea6e Before that change, expand dump had (insn 947 946 948 (set (reg:V8QI 578) (const_vector:V8QI [ (const_int 3 [0x3]) (const_int -4 [0xfffffffffffffffc]) (const_int 0 [0]) repeated x6 ])) "pr121649.c":63:3 -1 (nil)) ... (insn 1174 1173 1175 (set (reg:V8QI 33 v1) (reg:V8QI 578)) "pr121649.c":63:3 -1 (nil)) but in r16-2382 it has instead: (insn 1173 1172 1174 (set (reg:V8QI 33 v1) (const_vector:V8QI [ (const_int 3 [0x3]) (const_int -4 [0xfffffffffffffffc]) (const_int 0 [0]) repeated x6 ])) "pr121649.c":63:3 -1 (nil)) The problem seems to happen during cse2. We have (insn 1173 1172 1174 2 (set (reg:V8QI 33 v1) (const_vector:V8QI [ (const_int 3 [0x3]) (const_int -4 [0xfffffffffffffffc]) (const_int 0 [0]) repeated x6 ])) "pr121649.c":63:3 1325 {*aarch64_simd_movv8qi} (nil)) ... (insn 1178 1177 1179 2 (set (reg:QI 4 x4) (vec_select:QI (reg:V8QI 33 v1) (parallel [ (const_int 1 [0x1]) ]))) "pr121649.c":63:3 2976 {aarch64_get_lanev8qi} (expr_list:REG_EQUAL (const_int -4 [0xfffffffffffffffc]) (nil))) but cse2 turns the latter into: (insn 1178 1177 1179 2 (set (reg:QI 4 x4) (const_int 0 [0])) "pr121649.c":63:3 107 {*movqi_aarch64} (expr_list:REG_EQUAL (const_int -4 [0xfffffffffffffffc]) (nil)))