[llvm-branch-commits] [llvm] [SimplifyCFG][profcheck] Fix artificially-failing `preserve-branchweights.ll` (PR #160629)

Mircea Trofin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 26 14:06:39 PDT 2025


mtrofin wrote:

> The test says:
> 
> ```llvm
> ; Don't crash processing degenerate metadata.
> 
> define void @or_icmps_empty_metadata(i32 %x, i32 %y, ptr %p) {
> ```
> 
> So I believe the intention here is specifically to test this degenerate situation of 0, 0 branch weights.
> 
> Possibly these should be rejected by the verifier? If that were the case, there would be no need to test them here.

Yup, and there's another test that I've been looking at that is about all-zero branch weights. I think a different fix is necessary than the one here. I'll mark this 'draft' for now.

https://github.com/llvm/llvm-project/pull/160629


More information about the llvm-branch-commits mailing list