[PATCH] D53129: [InstCombine] Fixed crash with aliased functions

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 16 11:28:29 PDT 2018


efriedma added a comment.

Please make sure your patches are reviewed by a qualified reviewer before you merge.



================
Comment at: llvm/trunk/include/llvm/Transforms/Utils/BuildLibCalls.h:31
   /// Returns true if any attributes were set and false otherwise.
-  bool inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI);
+  bool inferLibFuncAttributes(Function *Func, const TargetLibraryInfo &TLI);
 
----------------
Instead of making this function take a possibly-null pointer, could you add an overload that takes a StringRef and calls getFunction itself?  It's essentially equivalent, but it would make the intent more clear.


================
Comment at: llvm/trunk/test/Transforms/InstCombine/pr39177.ll:1
+; RUN: opt < %s -instcombine -S
+
----------------
Please add a CHECK line to make sure the expected transform actually happens.


Repository:
  rL LLVM

https://reviews.llvm.org/D53129





More information about the llvm-commits mailing list