'ub' Dialect
Operations ¶
ub.poison
(ub::PoisonOp) ¶
Poisoned constant operation.
Syntax:
operation ::= `ub.poison` attr-dict (`<` $value^ `>`)? `:` type($result)
The poison
operation materializes a compile-time poisoned constant value
to indicate deferred undefined behavior.
value
attribute is needed to indicate an optional additional poison
semantics (e.g. partially poisoned vectors), default value indicates results
is fully poisoned.
Examples:
// Short form
%0 = ub.poison : i32
// Long form
%1 = ub.poison <#custom_poison_elements_attr> : vector<4xi64>
Traits: AlwaysSpeculatableImplTrait
, ConstantLike
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
value | ::mlir::ub::PoisonAttrInterface | PoisonAttrInterface instance |
Results: ¶
Result | Description |
---|---|
result | any type |
Attributes ¶
PoisonAttr ¶
Syntax: #ub.poison