Rename ScalarType to LaneType.
The word "scalar" is a bit vague and tends to mean "non-vector". Since we are about to add new CPU flag value types that can't appear as vector lanes, make the distinction clear: LaneType represents value types that can appear as a vector lane. Also replace the Type::is_scalar() method with an is_vector() method.
This commit is contained in:
@@ -217,7 +217,7 @@ fn expand_select(inst: ir::Inst, func: &mut ir::Function, cfg: &mut ControlFlowG
|
||||
/// Expand illegal `f32const` and `f64const` instructions.
|
||||
fn expand_fconst(inst: ir::Inst, func: &mut ir::Function, _cfg: &mut ControlFlowGraph) {
|
||||
let ty = func.dfg.value_type(func.dfg.first_result(inst));
|
||||
assert!(ty.is_scalar(), "Only scalar fconst supported: {}", ty);
|
||||
assert!(!ty.is_vector(), "Only scalar fconst supported: {}", ty);
|
||||
|
||||
// In the future, we may want to generate constant pool entries for these constants, but for
|
||||
// now use an `iconst` and a bit cast.
|
||||
|
||||
Reference in New Issue
Block a user