zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 9d94c2ccd0341961ffb18ec7eb40ef6099d71794 (tree)
parent 349cd79fe433e165bf6cc7fc614dc5851ac86b6e
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Thu,  5 Jan 2017 03:29:50 -0500

fix mul and sub overflow ops being rendered as addition

Diffstat:
Msrc/codegen.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/codegen.cpp b/src/codegen.cpp @@ -1983,10 +1983,10 @@ static LLVMValueRef ir_render_overflow_op(CodeGen *g, IrExecutable *executable, add_sub_mul = AddSubMulAdd; break; case IrOverflowOpSub: - add_sub_mul = AddSubMulAdd; + add_sub_mul = AddSubMulSub; break; case IrOverflowOpMul: - add_sub_mul = AddSubMulAdd; + add_sub_mul = AddSubMulMul; break; case IrOverflowOpShl: return render_shl_with_overflow(g, instruction);