summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2012-11-28 21:21:18 +0000
committerMichael Ilseman <milseman@apple.com>2012-11-28 21:21:18 +0000
commit3d15a91777285782d94288707f5a2ecc988f2dc6 (patch)
tree5f3f2bd1b9bd2d826097cb681427f8a46e180bdd
parent9eec6599521ba64e59da4a5e5fdc79ba6964dbc6 (diff)
downloadllvm-3d15a91777285782d94288707f5a2ecc988f2dc6.tar.gz
llvm-3d15a91777285782d94288707f5a2ecc988f2dc6.tar.bz2
llvm-3d15a91777285782d94288707f5a2ecc988f2dc6.tar.xz
Whoops, fixed bad merge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168816 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--unittests/VMCore/IRBuilderTest.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/unittests/VMCore/IRBuilderTest.cpp b/unittests/VMCore/IRBuilderTest.cpp
index affd7b0fb1..8a22b104ba 100644
--- a/unittests/VMCore/IRBuilderTest.cpp
+++ b/unittests/VMCore/IRBuilderTest.cpp
@@ -119,61 +119,6 @@ TEST_F(IRBuilderTest, FastMathFlags) {
F = Builder.CreateLoad(GV);
F = Builder.CreateFAdd(F, F);
- EXPECT_FALSE(Builder.GetFastMathFlags().any());
- ASSERT_TRUE(isa<Instruction>(F));
- FAdd = cast<Instruction>(F);
- EXPECT_FALSE(FAdd->hasNoNaNs());
-
- FastMathFlags FMF;
- Builder.SetFastMathFlags(FMF);
-
- F = Builder.CreateFAdd(F, F);
- EXPECT_FALSE(Builder.GetFastMathFlags().any());
-
- FMF.UnsafeAlgebra = true;
- Builder.SetFastMathFlags(FMF);
-
- F = Builder.CreateFAdd(F, F);
- EXPECT_TRUE(Builder.GetFastMathFlags().any());
- ASSERT_TRUE(isa<Instruction>(F));
- FAdd = cast<Instruction>(F);
- EXPECT_TRUE(FAdd->hasNoNaNs());
-
- F = Builder.CreateFDiv(F, F);
- EXPECT_TRUE(Builder.GetFastMathFlags().any());
- EXPECT_TRUE(Builder.GetFastMathFlags().UnsafeAlgebra);
- ASSERT_TRUE(isa<Instruction>(F));
- FDiv = cast<Instruction>(F);
- EXPECT_TRUE(FDiv->hasAllowReciprocal());
-
- Builder.ClearFastMathFlags();
-
- F = Builder.CreateFDiv(F, F);
- ASSERT_TRUE(isa<Instruction>(F));
- FDiv = cast<Instruction>(F);
- EXPECT_FALSE(FDiv->hasAllowReciprocal());
-
- FMF.clear();
- FMF.AllowReciprocal = true;
- Builder.SetFastMathFlags(FMF);
-
- F = Builder.CreateFDiv(F, F);
- EXPECT_TRUE(Builder.GetFastMathFlags().any());
- EXPECT_TRUE(Builder.GetFastMathFlags().AllowReciprocal);
- ASSERT_TRUE(isa<Instruction>(F));
- FDiv = cast<Instruction>(F);
- EXPECT_TRUE(FDiv->hasAllowReciprocal());
-
-}
-
-TEST_F(IRBuilderTest, FastMathFlags) {
- IRBuilder<> Builder(BB);
- Value *F;
- Instruction *FDiv, *FAdd;
-
- F = Builder.CreateLoad(GV);
- F = Builder.CreateFAdd(F, F);
-
EXPECT_FALSE(Builder.getFastMathFlags().any());
ASSERT_TRUE(isa<Instruction>(F));
FAdd = cast<Instruction>(F);