mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 01:14:40 +00:00
"fix" #4169, looks like llvm 14 bug
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user