Make test more robust

Set the flags on FAdd locally rather than assuming nothing will change it from
way earlier in the test.

llvm-svn: 298462
This commit is contained in:
Adam Nemet 2017-03-21 23:50:52 +00:00
parent aece9951e5
commit 4226a9f2b8
1 changed files with 1 additions and 0 deletions

View 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());