[PATCH] D69312: [FPEnv] Teach the IRBuilder about correct use of the strictfp attribute.

Melanie Blower via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 11:18:01 PST 2019


mibintc added inline comments.


================
Comment at: llvm/include/llvm/IR/IRBuilder.h:262
+    Function *F = BB->getParent();
+    if (!F->hasFnAttribute(Attribute::StrictFP)) {
+      F->addFnAttr(Attribute::StrictFP);
----------------
F can be null which results in segfault, bug report here, https://bugs.llvm.org/show_bug.cgi?id=44048
The problem is only visible after wiring up -frounding-math in D62731 
I'm working on a patch that adds a null check


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69312/new/

https://reviews.llvm.org/D69312





More information about the llvm-commits mailing list