aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2024-08-31 19:40:05 +0200
committerLaytan <laytanlaats@hotmail.com>2024-08-31 19:40:05 +0200
commit722b638e2cbefcc1735256ef712cf2b28078a7fb (patch)
tree5c2446c5c15b72b401ebd3194a887c569c3a9795
parentc1cb1a3d7e546bcb73a012eda04521d1adbb6366 (diff)
"fix" #4169, looks like llvm 14 bug
-rw-r--r--src/llvm_backend_stmt.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp
index bef516283..df3d4bc03 100644
--- a/src/llvm_backend_stmt.cpp
+++ b/src/llvm_backend_stmt.cpp
@@ -2199,8 +2199,7 @@ gb_internal void lb_build_if_stmt(lbProcedure *p, Ast *node) {
// and `LLVMConstIntGetZExtValue()` calls below will be valid and `LLVMInstructionEraseFromParent()`
// will target the correct (& only) branch statement
-
- if (cond.value && LLVMIsConstant(cond.value)) {
+ if (cond.value && LLVMIsAConstantInt(cond.value)) {
// NOTE(bill): Do a compile time short circuit for when the condition is constantly known.
// This done manually rather than relying on the SSA passes because sometimes the SSA passes
// miss some even if they are constantly known, especially with few optimization passes.