Files
rust/tests/codegen-llvm/enum
dianqk 23fa0f40cf codegen: tell LLVM that the discriminant is a power of two
We should not disable the pattern in MatchBranchSimplification.
The two forms exhaustive match and cast are equivalent, but the cast is better represented in MIR: no branches, only one statement.

AFAIK, LLVM does not handle multiple disjoint intervals well.
As an workaround, the patch emits `assume(ctpop(val) == 1)` to tell LLVM that
the discriminant is a power of two.
2026-10-07 22:44:29 +08:00
..
2026-04-25 14:57:23 -07:00
2026-04-25 14:57:23 -07:00
2026-04-25 14:57:23 -07:00