summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/InstructionsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/IR/InstructionsTest.cpp')
-rw-r--r--llvm/unittests/IR/InstructionsTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp
index 94f37251e60..3b2bd6fa81b 100644
--- a/llvm/unittests/IR/InstructionsTest.cpp
+++ b/llvm/unittests/IR/InstructionsTest.cpp
@@ -993,5 +993,14 @@ TEST(InstructionsTest, SkipDebug) {
EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction());
}
+TEST(InstructionsTest, PhiIsNotFPMathOperator) {
+ LLVMContext Context;
+ IRBuilder<> Builder(Context);
+ MDBuilder MDHelper(Context);
+ Instruction *I = Builder.CreatePHI(Builder.getDoubleTy(), 0);
+ EXPECT_FALSE(isa<FPMathOperator>(I));
+ I->deleteValue();
+}
+
} // end anonymous namespace
} // end namespace llvm
OpenPOWER on IntegriCloud