[PATCH] D34043: [CGP] don't expand a memcmp with nobuiltin attribute

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 11:40:05 PDT 2017


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

LGTM with one minor tweak.



================
Comment at: include/llvm/Analysis/TargetLibraryInfo.h:246
+  bool getLibFunc(ImmutableCallSite CS, LibFunc &F) const {
+    return !CS.isNoBuiltin() && getLibFunc(*(CS.getCalledFunction()), F);
+  }
----------------
This should check that CS.getCalledFunction() is nonnull.  (CodeGenPrepare::optimizeCallInst checks this explicitly, but other code might not.)


https://reviews.llvm.org/D34043





More information about the llvm-commits mailing list