*/
flags.setAllowContract(); /* contract */
+ /* Allow reassociation transformations for floating-point
+ * instructions. This may dramatically change results.
+ */
+ flags.setAllowReassoc(); /* reassoc */
+
llvm::unwrap(builder)->setFastMathFlags(flags);
break;
}
{
auto *b = llvm::unwrap(builder);
llvm::FastMathFlags flags = b->getFastMathFlags();
+ assert(flags.allowContract() == flags.allowReassoc());
if (!flags.allowContract())
return false;
flags.setAllowContract(false);
+ flags.setAllowReassoc(false);
b->setFastMathFlags(flags);
return true;
}
{
auto *b = llvm::unwrap(builder);
llvm::FastMathFlags flags = b->getFastMathFlags();
+ assert(flags.allowContract() == flags.allowReassoc());
if (flags.allowContract() == value)
return;
flags.setAllowContract(value);
+ flags.setAllowReassoc(value);
b->setFastMathFlags(flags);
}