[llvm] [PreISelIntrinsicLowering] Produce a memset_pattern16 libcall for llvm.experimental.memset.pattern when available (PR #120420)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 08:47:23 PST 2025


================
@@ -233,6 +234,60 @@ static bool canEmitLibcall(const TargetMachine *TM, Function *F,
   return TLI->getLibcallName(LC) != nullptr;
 }
 
+// Return a value appropriate for use with the memset_pattern16 libcall, if
+// possible and if we know how. (Adapted from equivalent helper in
+// LoopIdiomRecognize).
+static Constant *getMemSetPattern16Value(MemSetPatternInst *Inst,
+                                         const TargetLibraryInfo &TLI) {
+  // FIXME: This could check for UndefValue because it can be merged into any
----------------
preames wrote:

Replace FIXME w/TODO.  Usually TODO means there's a bug, not a missed optimization.  

https://github.com/llvm/llvm-project/pull/120420


More information about the llvm-commits mailing list