From 9d94c2ccd0341961ffb18ec7eb40ef6099d71794 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 5 Jan 2017 03:29:50 -0500 Subject: fix mul and sub overflow ops being rendered as addition --- src/codegen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index c5d8144143..a1c89c239b 100644 --- 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); -- cgit v1.2.3