diff options
| author | Shawn Landden <shawn@git.icu> | 2019-11-06 20:00:39 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-07 02:51:04 -0500 |
| commit | 2e52fafac50b545b5ef7dce42d0827e8077a8698 (patch) | |
| tree | d9667b25e5392781125aebebc2503444d9ab67f4 /src/codegen.cpp | |
| parent | 697c4ffd41cb99efbcf2e2c5393dd07533552881 (diff) | |
| download | zig-2e52fafac50b545b5ef7dce42d0827e8077a8698.tar.gz zig-2e52fafac50b545b5ef7dce42d0827e8077a8698.zip | |
correctly use llvm undef in release modes
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 7d3ae656fb..89c41b61cc 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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); 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); } else { fill_char = ir_llvm_value(g, instruction->byte); |
