]> granicus.if.org Git - llvm/commitdiff
Make test more robust
authorAdam Nemet <anemet@apple.com>
Tue, 21 Mar 2017 23:50:52 +0000 (23:50 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 21 Mar 2017 23:50:52 +0000 (23:50 +0000)
Set the flags on FAdd locally rather than assuming nothing will change it from
way earlier in the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298462 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/IR/IRBuilderTest.cpp

index 1812cd39d135c642a81f7d80ceb9a1a11eee008b..5b27fd6636060d7a1bd24ae1a870396e21779e6a 100644 (file)
@@ -245,6 +245,7 @@ TEST_F(IRBuilderTest, FastMathFlags) {
   EXPECT_FALSE(FDiv->getFastMathFlags().any());
   FDiv->setHasAllowReciprocal(true);
   FAdd->setHasAllowReciprocal(false);
+  FAdd->setHasNoNaNs(true);
   FDiv->copyFastMathFlags(FAdd);
   EXPECT_TRUE(FDiv->hasNoNaNs());
   EXPECT_FALSE(FDiv->hasAllowReciprocal());