[PATCH] D47323: FastMathFlags: Make it easier to unset individual ones.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 08:06:08 PDT 2018


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM - thanks!

See https://bugs.llvm.org/show_bug.cgi?id=37581 for an independent bug based on this code.



================
Comment at: include/llvm/IR/Operator.h:210-214
+  void setAllowReassoc(bool B = true) {
+    Flags = (Flags & ~AllowReassoc) | B * AllowReassoc;
+  }
+  void setNoNaNs(bool B = true) { Flags = (Flags & ~NoNaNs) | B * NoNaNs; }
+  void setNoInfs(bool B = true) { Flags = (Flags & ~NoInfs) | B * NoInfs; }
----------------
Run clang-format on this? 

Would be easier to see that these are all the same basic logic if they all had the function body on a separate line.


Repository:
  rL LLVM

https://reviews.llvm.org/D47323





More information about the llvm-commits mailing list