[llvm-commits] [llvm] r168816 - /llvm/trunk/unittests/VMCore/IRBuilderTest.cpp

Michael Ilseman milseman at apple.com
Wed Nov 28 13:21:18 PST 2012


Author: milseman
Date: Wed Nov 28 15:21:18 2012
New Revision: 168816

URL: http://llvm.org/viewvc/llvm-project?rev=168816&view=rev
Log:
Whoops, fixed bad merge

Modified:
    llvm/trunk/unittests/VMCore/IRBuilderTest.cpp

Modified: llvm/trunk/unittests/VMCore/IRBuilderTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/VMCore/IRBuilderTest.cpp?rev=168816&r1=168815&r2=168816&view=diff
==============================================================================
--- llvm/trunk/unittests/VMCore/IRBuilderTest.cpp (original)
+++ llvm/trunk/unittests/VMCore/IRBuilderTest.cpp Wed Nov 28 15:21:18 2012
@@ -119,61 +119,6 @@
   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);





More information about the llvm-commits mailing list