From 19c9ae38cfd7f80a63ee9e9d0373516785e7c9bf Mon Sep 17 00:00:00 2001 From: Michael Ilseman Date: Wed, 28 Nov 2012 21:21:18 +0000 Subject: [PATCH] Whoops, fixed bad merge llvm-svn: 168816 --- unittests/VMCore/IRBuilderTest.cpp | 55 ------------------------------ 1 file changed, 55 deletions(-) diff --git a/unittests/VMCore/IRBuilderTest.cpp b/unittests/VMCore/IRBuilderTest.cpp index affd7b0fb16..8a22b104ba6 100644 --- a/unittests/VMCore/IRBuilderTest.cpp +++ b/unittests/VMCore/IRBuilderTest.cpp @@ -111,61 +111,6 @@ TEST_F(IRBuilderTest, GetIntTy) { EXPECT_EQ(IntPtrTy, IntegerType::get(getGlobalContext(), IntPtrBitSize)); } -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(F)); - FAdd = cast(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(F)); - FAdd = cast(F); - EXPECT_TRUE(FAdd->hasNoNaNs()); - - F = Builder.CreateFDiv(F, F); - EXPECT_TRUE(Builder.GetFastMathFlags().any()); - EXPECT_TRUE(Builder.GetFastMathFlags().UnsafeAlgebra); - ASSERT_TRUE(isa(F)); - FDiv = cast(F); - EXPECT_TRUE(FDiv->hasAllowReciprocal()); - - Builder.ClearFastMathFlags(); - - F = Builder.CreateFDiv(F, F); - ASSERT_TRUE(isa(F)); - FDiv = cast(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(F)); - FDiv = cast(F); - EXPECT_TRUE(FDiv->hasAllowReciprocal()); - -} - TEST_F(IRBuilderTest, FastMathFlags) { IRBuilder<> Builder(BB); Value *F;