Add ir::Types::lane_of as an alias of lane_type to be used in typevar constraints;

This commit is contained in:
Benjamin Bouvier
2019-07-02 18:29:41 +02:00
parent 4fef03f5f8
commit 3545363006
2 changed files with 10 additions and 3 deletions

View File

@@ -498,7 +498,7 @@ enum OperandConstraint {
/// This operand is the same type as the controlling type variable.
Same,
/// This operand is `ctrlType.lane_type()`.
/// This operand is `ctrlType.lane_of()`.
LaneOf,
/// This operand is `ctrlType.as_bool()`.
@@ -527,7 +527,7 @@ impl OperandConstraint {
Concrete(t) => Bound(t),
Free(vts) => ResolvedConstraint::Free(TYPE_SETS[vts as usize]),
Same => Bound(ctrl_type),
LaneOf => Bound(ctrl_type.lane_type()),
LaneOf => Bound(ctrl_type.lane_of()),
AsBool => Bound(ctrl_type.as_bool()),
HalfWidth => Bound(ctrl_type.half_width().expect("invalid type for half_width")),
DoubleWidth => Bound(