summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/VMCore/IRBuilderTest.cpp
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
commit37018f832273b28aa012c1f950c6af8e3ec2050f (patch)
tree74b97df255321e5d42cf1872c591864f3044ef22 /llvm/unittests/VMCore/IRBuilderTest.cpp
parent1833e000a3a50463b8c0ede48c378b30e706dcec (diff)
downloadbcm5719-llvm-37018f832273b28aa012c1f950c6af8e3ec2050f.tar.gz
bcm5719-llvm-37018f832273b28aa012c1f950c6af8e3ec2050f.zip
Whoops, fixed bad merge
llvm-svn: 168816
Diffstat (limited to 'llvm/unittests/VMCore/IRBuilderTest.cpp')
-rw-r--r--llvm/unittests/VMCore/IRBuilderTest.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/llvm/unittests/VMCore/IRBuilderTest.cpp b/llvm/unittests/VMCore/IRBuilderTest.cpp
index affd7b0fb16..8a22b104ba6 100644
--- a/llvm/unittests/VMCore/IRBuilderTest.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud