aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RuntimeCheck.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-14 03:36:21 +0000
committer_ov4 <ov4@ov4.org>2026-10-14 03:36:21 +0000
commitfebb9e4ac239a15ad8c46575643b53ca66e3f4ac (patch)
tree59436aa9897e44cc5f1cea1442755063ad4e4c20 /lib/CodeGen/RuntimeCheck.cc
parent2147449f4d6f37b4624990ff26bce58ebf3cfb4b (diff)
feat(codegen): support C scalar arithmetic and input output
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/RuntimeCheck.cc')
-rw-r--r--lib/CodeGen/RuntimeCheck.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RuntimeCheck.cc b/lib/CodeGen/RuntimeCheck.cc
index ee270e5..2954af0 100644
--- a/lib/CodeGen/RuntimeCheck.cc
+++ b/lib/CodeGen/RuntimeCheck.cc
@@ -23,7 +23,7 @@ void RuntimeCheck::emitCheck(Value *Condition) {
void RuntimeCheck::emitDivZeroCheck(Value *Divisor, int Line) {
Value *IsZero;
- if (Divisor->getType()->isDoubleTy()) {
+ if (Divisor->getType()->isFloatingPointTy()) {
IsZero = Builder.CreateFCmpOEQ(Divisor, ConstantFP::get(Divisor->getType(), 0.0), "is_zero");
} else {
IsZero = Builder.CreateICmpEQ(Divisor, ConstantInt::get(Divisor->getType(), 0), "is_zero");