correctly use llvm undef in release modes

This commit is contained in:
Shawn Landden 2019-11-06 20:00:39 -08:00 committed by Andrew Kelley
parent 697c4ffd41
commit 2e52fafac5

View File

@ -5128,7 +5128,7 @@ static LLVMValueRef ir_render_memset(CodeGen *g, IrExecutable *executable, IrIns
bool val_is_undef = value_is_all_undef(g, &instruction->byte->value); bool val_is_undef = value_is_all_undef(g, &instruction->byte->value);
LLVMValueRef fill_char; LLVMValueRef fill_char;
if (val_is_undef) { if (val_is_undef && ir_want_runtime_safety_scope(g, instruction->base.scope)) {
fill_char = LLVMConstInt(LLVMInt8Type(), 0xaa, false); fill_char = LLVMConstInt(LLVMInt8Type(), 0xaa, false);
} else { } else {
fill_char = ir_llvm_value(g, instruction->byte); fill_char = ir_llvm_value(g, instruction->byte);