<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64594>64594</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
CHR verifier failure
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:crash
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nikic
</td>
</tr>
</table>
<pre>
```llvm
define i64 @ham() !prof !29 {
bb:
switch i8 0, label %bb6 [
i8 1, label %bb1
i8 4, label %bb2
i8 9, label %bb5
]
bb1: ; preds = %bb
%select = select i1 false, i32 0, i32 0, !prof !30
br label %bb7
bb2: ; preds = %bb
%select3 = select i1 false, i32 0, i32 0, !prof !31
br label %bb7
bb4: ; No predecessors!
br label %bb5
bb5: ; preds = %bb4, %bb
%phi = phi i64 [ 0, %bb4 ], [ 0, %bb ]
br label %bb7
bb6: ; preds = %bb
unreachable
bb7:
ret i64 0
}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"ProfileSummary", !1}
!1 = !{!2, !3, !4, !5, !6, !7, !8, !9, !10, !11}
!2 = !{!"ProfileFormat", !"InstrProf"}
!3 = !{!"TotalCount", i64 597326977313}
!4 = !{!"MaxCount", i64 12561793713}
!5 = !{!"MaxInternalCount", i64 2509052618}
!6 = !{!"MaxFunctionCount", i64 12561793713}
!7 = !{!"NumCounts", i64 1694881}
!8 = !{!"NumFunctions", i64 129214}
!9 = !{!"IsPartialProfile", i64 0}
!10 = !{!"PartialProfileRatio", double 0.000000e+00}
!11 = !{!"DetailedSummary", !12}
!12 = !{!13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28}
!13 = !{i32 10000, i64 12561793713, i32 1}
!14 = !{i32 100000, i64 1733566697, i32 20}
!15 = !{i32 200000, i64 820928443, i32 71}
!16 = !{i32 300000, i64 404967336, i32 182}
!17 = !{i32 400000, i64 233162193, i32 376}
!18 = !{i32 500000, i64 120552435, i32 741}
!19 = !{i32 600000, i64 69388652, i32 1402}
!20 = !{i32 700000, i64 33926336, i32 2643}
!21 = !{i32 800000, i64 15635940, i32 5288}
!22 = !{i32 900000, i64 5547105, i32 11637}
!23 = !{i32 950000, i64 2224405, i32 20074}
!24 = !{i32 990000, i64 359838, i32 44778}
!25 = !{i32 999000, i64 37485, i32 81744}
!26 = !{i32 999900, i64 3465, i32 119656}
!27 = !{i32 999990, i64 529, i32 155440}
!28 = !{i32 999999, i64 70, i32 178344}
!29 = !{!"function_entry_count", i64 33781183}
!30 = !{!"branch_weights", i32 0, i32 9263770}
!31 = !{!"branch_weights", i32 0, i32 634318}
```
`-passes='require<profile-summary>,chr'` results in:
```
PHINode should have one entry for each predecessor of its parent basic block!
%phi.nonchr = phi i64 [ 0, %bb4 ], [ 0, %bb.split.nonchr ]
```
Observed during PGO build of LLVM.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysl12P2yoaxz8NuUETwcObucjFvGy2I_Vl1F3tbYVtErN17Bywp6ff_siOTYwzVdujE40G2_B7nj_wB2MTgjs21u6QeEDiaWP6rmr9rnFfXbHJ2_L7Dkly-avr1xMiT4jcl_bgGoud5BhxUpkTggyBxgjo2beHoRzu1MOleZ4jdn-5xDh8c11RYZdhguAR1ya3NUYg8lziQcPUDA8t6KoFTWr5qhaSWr2qFXMtEk-Xy1kcReweI_aAz96WASP2dCEiACLY2hbdWDVdOooPpg52yOIYXDoTLxYDwcgcJ_dLPSoVAb8qgv09FfSXVPBZxcd2FGILG0LrA4If8CLlxcD_1u-NLvOL9rTz58qNLYZy9J14mDs5IOOsDnfJ4-tc_6Tf8p_QPWfqG29NUZm8tmkWtVgG3nZjPyZ3IJWYEgEdVtv21JZ9bbeH2hznRHRYVkDJLUEWLQYP0MkDCODFtwdX2__0p5Px3xHAVEWvUYDSNMPchk3lNC1UTKWcSjWV2VTqOfbswTQLpFmu4vatP5nuqg0BPDeh80P18HQRg93E-G_bmfqx7Zs5wDC2QisG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