https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105219
--- Comment #8 from Tamar Christina <tnfchris at gcc dot gnu.org> --- looks like the code out of the vectorizer is fine, and between the two versions it doesn't change. The big change is in the unroller, decides to drops one of the BBs for some reason. It turns the loop mask phi node from # loop_mask_374 = PHI <next_mask_416(51), max_mask_372(53), next_mask_378(66), next_mask_397(68)> into # loop_mask_374 = PHI <next_mask_397(51), max_mask_372(53), next_mask_378(66)> and deletes the BB 68. And indeed -fdisable-tree-cunroll fixes the problem. It looks like BB68 in the broken version is being marked as unreachable by DFA and removed. Curiously with no codegen difference in output of vect, or in dce6 and pcom, the DFA in cunroll find different number of BBs good: Incremental SSA update started at block: 3 Number of blocks in CFG: 88 Number of blocks to update: 37 ( 42%) Affected blocks: 4 18 28 34 45 47 50 51 53 54 56 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 bad: Incremental SSA update started at block: 3 Number of blocks in CFG: 86 Number of blocks to update: 35 ( 41%) Affected blocks: 4 18 28 34 45 47 50 51 53 54 56 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 why did it lose 2 BBs? Is there some info missing from the dump files here?