| name | mem2reg-verification |
| description | Implement and verify issue |
Mem2Reg Verification
Use this skill for issue #83 and similar SSA-promotion verification work.
Workflow
- Document formal mem2reg correctness pre/post-conditions in code.
- Add an Alive2 corpus of before/after
.ll files under tests/alive2/mem2reg/.
- Add property-based tests that generate random alloca/load/store patterns and check semantic equivalence of original vs mem2reg output by execution.
- Run targeted and full tests.
- Post PR review feedback with findings/fixes before merge.
Minimum validation
cargo +stable test -p llvm-transforms
cargo +stable test -q
Notes
- Prefer deterministic random generation with bounded IR complexity.
- Keep property tests stable on Linux/macOS (graceful skip if
cc is unavailable).