diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 5a4a53b804..0c79316652 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -23280,10 +23280,16 @@ static void ir_eval_float_op(IrAnalyze *ira, IrInstructionFloatOp *source_instr, BuiltinFnId fop = source_instr->op; unsigned bits; - if (float_type->id == ZigTypeIdComptimeFloat) { + switch (float_type->id) { + case ZigTypeIdComptimeFloat: bits = 128; - } else if (float_type->id == ZigTypeIdFloat) + break; + case ZigTypeIdFloat: bits = float_type->data.floating.bit_count; + break; + default: + zig_unreachable(); + } switch (bits) { case 16: { |
