Berildocs GitHub

Memory cards

Instruction selection matches IR trees to target patterns

confidence: highupdated: 2026-11-25status: activecompilercodegenisel

Claim#

The selector rewrites IR shapes into machine instructions, preferring a single instruction when one covers the tree.

Test#

Feed a pattern that has a fused instruction. Compare with a naive lowering.

Proof#

The fused instruction with correct flags.

Failure modes#

A pattern that ignores side effects reorders a load. A cost model can pick a worse pattern.