Skip to content

Commit

Permalink
"fix" #4169, looks like llvm 14 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
laytan committed Aug 31, 2024
1 parent c1cb1a3 commit 722b638
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/llvm_backend_stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 722b638

Please sign in to comment.