From 1e5f00e7a7e8bb482a5388464f23d743040d1dbb Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 9 Jul 2009 23:48:35 +0000 Subject: This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp') diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index b8e44799ba9..0a3659c71de 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -507,7 +507,7 @@ void LoopUnswitch::EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, // code is the true version and the new code is the false version. Value *BranchVal = LIC; if (!isa(Val) || Val->getType() != Type::Int1Ty) - BranchVal = new ICmpInst(ICmpInst::ICMP_EQ, LIC, Val, "tmp", InsertPt); + BranchVal = new ICmpInst(InsertPt, ICmpInst::ICMP_EQ, LIC, Val, "tmp"); else if (Val != Context->getConstantIntTrue()) // We want to enter the new loop when the condition is true. std::swap(TrueDest, FalseDest); -- cgit v1.2.3