Skip to content

test: cover shared defer callbr successors - #86

Open
zhouguangyuan0718 wants to merge 1 commit into
go1.27.masterfrom
codex/defer-simple-fixes
Open

test: cover shared defer callbr successors#86
zhouguangyuan0718 wants to merge 1 commit into
go1.27.masterfrom
codex/defer-simple-fixes

Conversation

@zhouguangyuan0718

Copy link
Copy Markdown

Depends on goallc/llvm-project#43.

Add a classic-defer shape with nine static defers. O2 merges the final normal and recovery blocks, so the last llvm.go.defer.edge callbr has the same default and indirect destination. Cover both optimized IR and execution of all nine deferred calls.

Tests:

  • go test cmd/internal/testdir -run=^Test/LLVM/codegen/codegen/llvm_defer.go$ -v -count=1
  • go test cmd/internal/testdir -run=^Test/LLVM/runtime/llvm_defer.go$ -v -count=1

Both tests use the LLVM tools from goallc/llvm-project#43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant