summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/IRBuilderTest.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2019-10-18 16:16:36 +0000
committerJay Foad <jay.foad@gmail.com>2019-10-18 16:16:36 +0000
commita162817a2b7ca0d7bd285a2a3e969a3a652aad57 (patch)
treecb9babf668efd46b412afb1b8725a4ac493641c5 /llvm/unittests/IR/IRBuilderTest.cpp
parentaa3806b47c74c814c9cb6f1de6a5570998b8f011 (diff)
downloadbcm5719-llvm-a162817a2b7ca0d7bd285a2a3e969a3a652aad57.tar.gz
bcm5719-llvm-a162817a2b7ca0d7bd285a2a3e969a3a652aad57.zip
[IR] Reimplement FPMathOperator::classof as a whitelist.
Summary: This makes it much easier to verify that the implementation matches the documentation. It uncovered a bug in the unit tests where we were accidentally setting fast math flags on a load instruction. Reviewers: spatel, wristow, arsenm, hfinkel, aemerson, efriedma, cameron.mcinally, mcberg2017, jmolloy Subscribers: wdng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69176 llvm-svn: 375252
Diffstat (limited to 'llvm/unittests/IR/IRBuilderTest.cpp')
-rw-r--r--llvm/unittests/IR/IRBuilderTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index 8fb5337a291..3c9dbc7f19d 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -376,7 +376,7 @@ TEST_F(IRBuilderTest, UnaryOperators) {
ASSERT_FALSE(isa<BinaryOperator>(U));
// Test CreateFNegFMF(X)
- Instruction *I = cast<Instruction>(V);
+ Instruction *I = cast<Instruction>(U);
I->setHasNoSignedZeros(true);
I->setHasNoNaNs(true);
Value *VFMF = Builder.CreateFNegFMF(V, I);
OpenPOWER on IntegriCloud