aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stage1/ir.cpp')
-rw-r--r--src/stage1/ir.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp
index 2f4e0aa0e7..62834e564d 100644
--- a/src/stage1/ir.cpp
+++ b/src/stage1/ir.cpp
@@ -4480,6 +4480,12 @@ static ConstCastOnly types_match_const_cast_only(IrAnalyze *ira, ZigType *wanted
return result;
}
+ if (wanted_type->id == ZigTypeIdFloat && actual_type->id == ZigTypeIdFloat) {
+ if (wanted_type->data.floating.bit_count == actual_type->data.floating.bit_count) {
+ return result;
+ }
+ }
+
if (wanted_type->id == ZigTypeIdVector && actual_type->id == ZigTypeIdVector) {
if (actual_type->data.vector.len != wanted_type->data.vector.len) {
result.id = ConstCastResultIdVectorLength;