aboutsummaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-04-16 19:39:33 +0000
committerDuncan Sands <baldrick@free.fr>2012-04-16 19:39:33 +0000
commit2867c85a3754320f96e36afb63325bb76269caa4 (patch)
treec5bd58459f230d669f87a597c75213ab42b9529d /unittests
parent2c651fe6f445724627dcc48064797dca2aa4aedc (diff)
downloadexternal_llvm-2867c85a3754320f96e36afb63325bb76269caa4.zip
external_llvm-2867c85a3754320f96e36afb63325bb76269caa4.tar.gz
external_llvm-2867c85a3754320f96e36afb63325bb76269caa4.tar.bz2
Remove support for the special 'fast' value for fpmath accuracy for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/MDBuilderTest.cpp12
-rw-r--r--unittests/VMCore/InstructionsTest.cpp8
2 files changed, 0 insertions, 20 deletions
diff --git a/unittests/Support/MDBuilderTest.cpp b/unittests/Support/MDBuilderTest.cpp
index e8e0386..d54c7e8 100644
--- a/unittests/Support/MDBuilderTest.cpp
+++ b/unittests/Support/MDBuilderTest.cpp
@@ -27,24 +27,12 @@ TEST_F(MDBuilderTest, createString) {
EXPECT_EQ(Str0->getString(), StringRef(""));
EXPECT_EQ(Str1->getString(), StringRef("string"));
}
-TEST_F(MDBuilderTest, createFastFPMath) {
- MDBuilder MDHelper(Context);
- MDNode *MD = MDHelper.createFastFPMath();
- EXPECT_NE(MD, (MDNode *)0);
- EXPECT_EQ(MD->getNumOperands(), 1U);
- Value *Op = MD->getOperand(0);
- EXPECT_TRUE(isa<MDString>(Op));
- EXPECT_EQ(cast<MDString>(Op)->getString(), "fast");
-}
TEST_F(MDBuilderTest, createFPMath) {
MDBuilder MDHelper(Context);
MDNode *MD0 = MDHelper.createFPMath(0.0);
MDNode *MD1 = MDHelper.createFPMath(1.0);
- MDNode *MDF = MDHelper.createFPMath(-1.0);
- MDNode *MDF2 = MDHelper.createFastFPMath();
EXPECT_EQ(MD0, (MDNode *)0);
EXPECT_NE(MD1, (MDNode *)0);
- EXPECT_EQ(MDF, MDF2);
EXPECT_EQ(MD1->getNumOperands(), 1U);
Value *Op = MD1->getOperand(0);
EXPECT_TRUE(isa<ConstantFP>(Op));
diff --git a/unittests/VMCore/InstructionsTest.cpp b/unittests/VMCore/InstructionsTest.cpp
index 9c0cb44..d002101 100644
--- a/unittests/VMCore/InstructionsTest.cpp
+++ b/unittests/VMCore/InstructionsTest.cpp
@@ -235,19 +235,11 @@ TEST(InstructionsTest, FPMathOperator) {
MDBuilder MDHelper(Context);
Instruction *I = Builder.CreatePHI(Builder.getDoubleTy(), 0);
MDNode *MD1 = MDHelper.createFPMath(1.0);
- MDNode *MDF = MDHelper.createFastFPMath();
Value *V1 = Builder.CreateFAdd(I, I, "", MD1);
- Value *VF = Builder.CreateFAdd(I, I, "", MDF);
EXPECT_TRUE(isa<FPMathOperator>(V1));
- EXPECT_TRUE(isa<FPMathOperator>(VF));
FPMathOperator *O1 = cast<FPMathOperator>(V1);
- FPMathOperator *OF = cast<FPMathOperator>(VF);
- EXPECT_FALSE(O1->isFastFPAccuracy());
- EXPECT_TRUE(OF->isFastFPAccuracy());
EXPECT_EQ(O1->getFPAccuracy(), 1.0);
- EXPECT_GT(OF->getFPAccuracy(), 999.0);
delete V1;
- delete VF;
delete I;
}