https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110232
Bug ID: 110232 Summary: failure to constant fold VIEW_CONVERT_EXPR<vector(16) <signed-boolean:1>>(65534) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- With int a[4096]; void foo () { for (int i = 1; i < 4095; ++i) a[i] = 42; } and -O3 -march=znver4 --param vect-partial-vector-usage=2 -fno-vect-cost-model which triggers peeling for alignment and a fully masked loop we end up with <bb 2> [local count: 10737416]: _17 = VIEW_CONVERT_EXPR<vector(16) <signed-boolean:1>>(65534); <bb 3> [local count: 75161909]: # i_8 = PHI <i_5(5), 1(2)> # ivtmp_2 = PHI <ivtmp_1(5), 4094(2)> # vectp_a.4_6 = PHI <vectp_a.4_11(5), &a(2)> # ivtmp_14 = PHI <ivtmp_15(5), 4095(2)> # loop_mask_12 = PHI <_18(5), _17(2)> .MASK_STORE (vectp_a.4_6, 512B, loop_mask_12, { 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 }); which isn't constant folded until we expand to RTL.