From 5fead02594bca4ea16f5459da6493e2ad4b17075 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Tue, 21 Mar 2017 23:50:52 +0000 Subject: [PATCH] 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 --- unittests/IR/IRBuilderTest.cpp | 1 + 1 file changed, 1 insertion(+) 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()); -- 2.50.1