From: Adam Nemet Date: Tue, 21 Mar 2017 23:50:52 +0000 (+0000) Subject: Make test more robust X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fead02594bca4ea16f5459da6493e2ad4b17075;p=llvm Make test more robust 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 --- diff --git a/unittests/IR/IRBuilderTest.cpp b/unittests/IR/IRBuilderTest.cpp index 1812cd39d13..5b27fd66360 100644 --- a/unittests/IR/IRBuilderTest.cpp +++ b/unittests/IR/IRBuilderTest.cpp @@ -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());