summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/InstructionsTest.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-09-25 13:29:09 +0000
committerSanjay Patel <spatel@rotateright.com>2019-09-25 13:29:09 +0000
commit2cec4b58f5ce7d5c843dbfb753b0acb29c81cfc0 (patch)
tree742840a75e3e3e25c93dc802a9003cc0b091b883 /llvm/unittests/IR/InstructionsTest.cpp
parent791526085338594381adcacc13f04a4834e56d36 (diff)
downloadbcm5719-llvm-2cec4b58f5ce7d5c843dbfb753b0acb29c81cfc0.tar.gz
bcm5719-llvm-2cec4b58f5ce7d5c843dbfb753b0acb29c81cfc0.zip
Revert [IR] allow fast-math-flags on phi of FP values
This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00) llvm-svn: 372868
Diffstat (limited to 'llvm/unittests/IR/InstructionsTest.cpp')
-rw-r--r--llvm/unittests/IR/InstructionsTest.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp
index afd579400ff..b2ea3844d33 100644
--- a/llvm/unittests/IR/InstructionsTest.cpp
+++ b/llvm/unittests/IR/InstructionsTest.cpp
@@ -1034,16 +1034,13 @@ TEST(InstructionsTest, SkipDebug) {
EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction());
}
-TEST(InstructionsTest, PhiMightNotBeFPMathOperator) {
+TEST(InstructionsTest, PhiIsNotFPMathOperator) {
LLVMContext Context;
IRBuilder<> Builder(Context);
MDBuilder MDHelper(Context);
- Instruction *I = Builder.CreatePHI(Builder.getInt32Ty(), 0);
+ Instruction *I = Builder.CreatePHI(Builder.getDoubleTy(), 0);
EXPECT_FALSE(isa<FPMathOperator>(I));
I->deleteValue();
- Instruction *FP = Builder.CreatePHI(Builder.getDoubleTy(), 0);
- EXPECT_TRUE(isa<FPMathOperator>(FP));
- FP->deleteValue();
}
TEST(InstructionsTest, FNegInstruction) {
OpenPOWER on IntegriCloud