diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-23 06:05:41 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-23 06:05:41 +0000 |
commit | 266e42b312ab7c457d1eab01475f63e59f60933c (patch) | |
tree | 7ac7dbe9437ac2cdbbf532cacb9e043dc6f5645a /llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | f171af97d50df7ebd7661756e89eef2295014e81 (diff) | |
download | bcm5719-llvm-266e42b312ab7c457d1eab01475f63e59f60933c.tar.gz bcm5719-llvm-266e42b312ab7c457d1eab01475f63e59f60933c.zip |
For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index e1d4a33e71e..d0b97e0d7f2 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -486,12 +486,11 @@ static void EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, // Insert a conditional branch on LIC to the two preheaders. The original // code is the true version and the new code is the false version. Value *BranchVal = LIC; - if (!isa<ConstantBool>(Val)) { - BranchVal = BinaryOperator::createSetEQ(LIC, Val, "tmp", InsertPt); - } else if (Val != ConstantBool::getTrue()) { + if (!isa<ConstantBool>(Val)) + BranchVal = new ICmpInst(ICmpInst::ICMP_EQ, LIC, Val, "tmp", InsertPt); + else if (Val != ConstantBool::getTrue()) // We want to enter the new loop when the condition is true. std::swap(TrueDest, FalseDest); - } // Insert the new branch. new BranchInst(TrueDest, FalseDest, BranchVal, InsertPt); |