https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106375
Bug ID: 106375 Summary: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov. Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: crazylht at gmail dot com Target Milestone: --- void foo (_Complex double* p, _Complex double* __restrict q) { for (int i = 0; i != 1000; i++) p[i] = q[i]; } before lowering complex type move <bb 2> [local count: 10737416]: __builtin_memcpy (p_10(D), q_9(D), 16000); return; After r13-1762-gf9d4c3b45c5ed5f45c8089c990dbd4e181929c3d, it's 18 <bb 3> [local count: 1063004409]: 19 # i_15 = PHI <i_12(5), 0(2)> 20 # ivtmp_13 = PHI <ivtmp_5(5), 1000(2)> 21 _1 = (long unsigned int) i_15; 22 _2 = _1 * 16; 23 _3 = q_9(D) + _2; 24 _4 = p_10(D) + _2; 25 _7 = REALPART_EXPR <*_3>; 26 _6 = IMAGPART_EXPR <*_3>; 27 REALPART_EXPR <*_4> = _7; 28 IMAGPART_EXPR <*_4> = _6; 29 i_12 = i_15 + 1; 30 ivtmp_5 = ivtmp_13 - 1; 31 if (ivtmp_5 != 0) 32 goto <bb 5>; [99.00%] 33 else