[llvm-commits] [dragonegg] r92714 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Tue Jan 5 00:12:43 PST 2010
Author: baldrick
Date: Tue Jan 5 02:12:42 2010
New Revision: 92714
URL: http://llvm.org/viewvc/llvm-project?rev=92714&view=rev
Log:
Port commit 91665 (djg) from llvm-gcc:
Emit signed multiply with the NSW flag.
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=92714&r1=92713&r2=92714&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Tue Jan 5 02:12:42 2010
@@ -3351,6 +3351,8 @@
V = Builder.CreateNSWAdd(LHS, RHS);
else if (Opc == Instruction::Sub && TyIsSigned && !flag_wrapv)
V = Builder.CreateNSWSub(LHS, RHS);
+ else if (Opc == Instruction::Mul && TyIsSigned && !flag_wrapv)
+ V = Builder.CreateNSWMul(LHS, RHS);
else
V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS);
if (ResTy != Ty)
More information about the llvm-commits
mailing list