aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-27 22:26:04 +0100
committergingerBill <bill@gingerbill.org>2022-05-27 22:26:04 +0100
commit5c10b35df7b174e883a5523b82f4124a1951a27d (patch)
tree9e916d5480c025d93ca154be7c45146e1162ce88 /src/check_builtin.cpp
parent20c5033b38e108b1e127cc6b8be61cce043cba9e (diff)
Fix sqrt for simd
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index ba34a177b..ad227489b 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -3704,12 +3704,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
return false;
}
}
- if (!is_type_float(x.type)) {
- gbString xts = type_to_string(x.type);
- error(x.expr, "Expected a floating point value for '%.*s', got %s", LIT(builtin_name), xts);
- gb_string_free(xts);
- return false;
- } else if (x.mode == Addressing_Constant) {
+ if (is_type_float(x.type) && x.mode == Addressing_Constant) {
f64 v = exact_value_to_f64(x.value);
operand->mode = Addressing_Constant;