Skip to content

sanitizer.assert.value

sanitizer dialect

Assert predicate constraints over SSA values and return checked identity aliases. Unlike assume ops, this op is executable: failing the assertion reports the site and aborts execution. Passing the assertion refines facts for the returned aliases.

Operation contract

Property Value
Semantic phase
Traits UnknownEffects, FactIdentity

Signature

Kind Name Type Cardinality Description
Operand values any variadic Values observed by the assertion predicates.
Result results any variadic Same values on the path where every predicate held.
Attribute predicates predicate_list required Predicate constraints that must hold at runtime.

Verification constraints

  • VariadicValuesMatch(values, results)

Examples

%n_checked = sanitizer.assert.value %n [range(%n, 0, 4096), mul(%n, 16)] : index
%x_checked, %y_checked = sanitizer.assert.value %x, %y [lt(%x, %y)] : i32, i32