Skip to content

CodeGen: Use RuntimeLibcallsInfo for memset_pattern16 - #241384

Merged
arsenm merged 1 commit into
mainfrom
users/arsenm/codegen/preisel-memset-pattern-runtime-libcalls
Nov 12, 2026
Merged

arsenm merged 1 commit into
mainfrom
users/arsenm/codegen/preisel-memset-pattern-runtime-libcalls

Conversation

@arsenm

@arsenm arsenm commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

CodeGen passes shouldn't be using TargetLibraryInfo for functions they will emit.
Use RuntimeLibcallsInfo which knows how to insert the correctly typed and annotated
declaration. This is a slight behavior change since RuntimeLibcallsInfo respects the
triple's libcall availability, but doesn't respect TargetLibraryInfo "no-builtins" attributes.
This is consistent with how regular memset is treated.

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

arsenm commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@arsenm
arsenm marked this pull request as ready for review November 11, 2026 16:35
@llvmorg-github-actions llvmorg-github-actions Bot added llvm:ir llvm:analysis Includes value tracking, cost tables and constant folding llvm:transforms labels Nov 11, 2026
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-llvm-transforms

Author: Matt Arsenault (arsenm)

Changes

CodeGen passes shouldn't be using TargetLibraryInfo for functions they
will emit. Use RuntimeLibcallsInfo which knows how to insert the
correctly typed and annotated declaration.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


Full diff: https://github.com/llvm/llvm-project/pull/241384.diff

5 Files Affected:

  • (modified) llvm/include/llvm/Analysis/LibcallLoweringInfo.h (+4)
  • (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+7-3)
  • (modified) llvm/include/llvm/IR/RuntimeLibcallsImpl.td (+1)
  • (modified) llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp (+14-16)
  • (modified) llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll (+9-6)
diff --git a/llvm/include/llvm/Analysis/LibcallLoweringInfo.h b/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
index 083a86c4a9ef4..e513cd1e983a5 100644
--- a/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
+++ b/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
@@ -131,6 +131,10 @@ class ModuleLibcallLoweringInfo {
 
   operator bool() const { return RTLCI != nullptr; }
 
+  const RTLIB::RuntimeLibcallsInfo &getRuntimeLibcallsInfo() const {
+    return *RTLCI;
+  }
+
   LLVM_ABI bool invalidate(Module &, const PreservedAnalyses &,
                            ModuleAnalysisManager::Invalidator &);
 
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 6d339cbd33d4f..5e497c84d6a2e 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -1105,9 +1105,13 @@ def MEMCHR : RuntimeLibcall<Ptr, [Ptr, Int, SizeT]>;
 def MEMPCPY : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT]>;
 def MEMPCPY_CHK : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT, SizeT]>;
 def MEMRCHR : RuntimeLibcall<Ptr, [Ptr, Int, SizeT]>;
-def MEMSET_PATTERN16 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
-def MEMSET_PATTERN4 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
-def MEMSET_PATTERN8 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
+foreach Size = [4, 8, 16] in {
+  def MEMSET_PATTERN#Size : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]> {
+    let FnAttrs = [NoCallback, NoFree, NoSync, NoUnwind, WillReturn];
+    let Memory = ArgMemOnly;
+    let ParamAttrs = [[CapturesNone, WriteOnly], [CapturesNone, ReadOnly]];
+  }
+}
 def MKDIR : RuntimeLibcall<Int, [Ptr, IntX]>;
 def MKTIME : RuntimeLibcall<IntPlus, [Ptr]>;
 def MSVC_DELETE_ARRAY_PTR32 : RuntimeLibcall<Void, [Ptr]>;
diff --git a/llvm/include/llvm/IR/RuntimeLibcallsImpl.td b/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
index 03346b17fece4..da452fcc813cf 100644
--- a/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+++ b/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
@@ -159,6 +159,7 @@ class MemoryEffects<ModRefInfo mr = ModRef> {
 
 def UnknownMemory : MemoryEffects;
 def NoMemory : MemoryEffects<NoModRef>;
+def ArgMemOnly : MemoryEffects<NoModRef> { let ArgMem = ModRef; }
 def ArgMemWriteOnly : MemoryEffects<NoModRef> { let ArgMem = Mod; }
 def ErrnoMemWriteOnly : MemoryEffects<NoModRef> { let ErrnoMem = Mod; }
 
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index d1f34737fbafc..05fa1f27ebf06 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -43,7 +43,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
-#include "llvm/Transforms/Utils/BuildLibCalls.h"
 #include "llvm/Transforms/Utils/LowerMemIntrinsics.h"
 #include "llvm/Transforms/Utils/LowerVectorIntrinsics.h"
 
@@ -339,8 +338,9 @@ bool PreISelIntrinsicLowering::tryExpandBoundedMemSet(
 // 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) {
+static Constant *
+getMemSetPattern16Value(MemSetPatternInst *Inst,
+                        const RTLIB::RuntimeLibcallsInfo &RTLCI) {
   // TODO: This could check for UndefValue because it can be merged into any
   // other valid pattern.
 
@@ -351,9 +351,8 @@ static Constant *getMemSetPattern16Value(MemSetPatternInst *Inst,
   Value *V = Inst->getValue();
   Type *VTy = V->getType();
   const DataLayout &DL = Inst->getDataLayout();
-  Module *M = Inst->getModule();
 
-  if (!isLibFuncEmittable(M, &TLI, LibFunc_memset_pattern16))
+  if (!RTLCI.isAvailable(RTLIB::impl_memset_pattern16))
     return nullptr;
 
   // If the value isn't a constant, we can't promote it to being in a constant
@@ -489,8 +488,9 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
     case Intrinsic::experimental_memset_pattern: {
       auto *Memset = cast<MemSetPatternInst>(Inst);
       Function *ParentFunc = Memset->getFunction();
-      const TargetLibraryInfo &TLI = LookupTLI(*ParentFunc);
-      Constant *PatternValue = getMemSetPattern16Value(Memset, TLI);
+      const RTLIB::RuntimeLibcallsInfo &RTLCI =
+          ModuleLibcalls.getRuntimeLibcallsInfo();
+      Constant *PatternValue = getMemSetPattern16Value(Memset, RTLCI);
       if (!PatternValue) {
         // If it isn't possible to emit a memset_pattern16 libcall, expand to
         // a loop instead.
@@ -506,13 +506,9 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
       Module *M = Memset->getModule();
       const DataLayout &DL = Memset->getDataLayout();
 
-      Type *DestPtrTy = Memset->getRawDest()->getType();
-      Type *SizeTTy = TLI.getSizeTType(*M);
-      StringRef FuncName = "memset_pattern16";
-      FunctionCallee MSP = getOrInsertLibFunc(M, TLI, LibFunc_memset_pattern16,
-                                              Builder.getVoidTy(), DestPtrTy,
-                                              Builder.getPtrTy(), SizeTTy);
-      inferNonMandatoryLibFuncAttrs(M, FuncName, TLI);
+      FunctionCallee MSP =
+          RTLCI.getOrInsertLibcallDecl(*M, RTLIB::impl_memset_pattern16);
+      Type *SizeTTy = MSP.getFunctionType()->getParamType(2);
 
       // Otherwise we should form a memset_pattern16.  PatternValue is known
       // to be an constant array of 16-bytes. Put the value into a mergable
@@ -535,11 +531,13 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
       }
       Value *PatternPtr = GV;
       Value *NumBytes = Builder.CreateMul(
-          TLI.getAsSizeT(DL.getTypeAllocSize(Memset->getValue()->getType()),
-                         *M),
+          ConstantInt::get(SizeTTy,
+                           DL.getTypeAllocSize(Memset->getValue()->getType())),
           Builder.CreateZExtOrTrunc(Memset->getLength(), SizeTTy));
       CallInst *MemsetPattern16Call =
           Builder.CreateCall(MSP, {Memset->getRawDest(), PatternPtr, NumBytes});
+      MemsetPattern16Call->setCallingConv(
+          RTLCI.getLibcallImplCallingConv(RTLIB::impl_memset_pattern16));
       MemsetPattern16Call->setAAMetadata(Memset->getAAMetadata());
       // Preserve any call site attributes on the destination pointer
       // argument (e.g. alignment).
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
index e8c2f0abcbf1b..700847c0b62c2 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
@@ -19,14 +19,17 @@
 ; MACOS: declare i32 @getc_unlocked(ptr)
 ; MACOS: declare i32 @getchar_unlocked()
 
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern16(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern4(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern8(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern16(ptr, ptr, i64)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern4(ptr, ptr, i64)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern8(ptr, ptr, i64)
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern16(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS:#[0-9]+]]
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern4(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern8(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern16(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS:#[0-9]+]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern4(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern8(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS]]
 
 ; MACOS: declare i32 @putc_unlocked(i32, ptr)
 ; MACOS: declare i32 @putchar_unlocked(i32)
 
+; HAS-MEMSET-PATTERN-32: attributes [[MEMSET_PATTERN_ATTRS]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; HAS-MEMSET-PATTERN-64: attributes [[MEMSET_PATTERN_ATTRS]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+
 ; NO-MEMSET-PATTERN-NOT: memset_pattern

@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-llvm-analysis

Author: Matt Arsenault (arsenm)

Changes

CodeGen passes shouldn't be using TargetLibraryInfo for functions they
will emit. Use RuntimeLibcallsInfo which knows how to insert the
correctly typed and annotated declaration.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


Full diff: https://github.com/llvm/llvm-project/pull/241384.diff

5 Files Affected:

  • (modified) llvm/include/llvm/Analysis/LibcallLoweringInfo.h (+4)
  • (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+7-3)
  • (modified) llvm/include/llvm/IR/RuntimeLibcallsImpl.td (+1)
  • (modified) llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp (+14-16)
  • (modified) llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll (+9-6)
diff --git a/llvm/include/llvm/Analysis/LibcallLoweringInfo.h b/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
index 083a86c4a9ef4..e513cd1e983a5 100644
--- a/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
+++ b/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
@@ -131,6 +131,10 @@ class ModuleLibcallLoweringInfo {
 
   operator bool() const { return RTLCI != nullptr; }
 
+  const RTLIB::RuntimeLibcallsInfo &getRuntimeLibcallsInfo() const {
+    return *RTLCI;
+  }
+
   LLVM_ABI bool invalidate(Module &, const PreservedAnalyses &,
                            ModuleAnalysisManager::Invalidator &);
 
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 6d339cbd33d4f..5e497c84d6a2e 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -1105,9 +1105,13 @@ def MEMCHR : RuntimeLibcall<Ptr, [Ptr, Int, SizeT]>;
 def MEMPCPY : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT]>;
 def MEMPCPY_CHK : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT, SizeT]>;
 def MEMRCHR : RuntimeLibcall<Ptr, [Ptr, Int, SizeT]>;
-def MEMSET_PATTERN16 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
-def MEMSET_PATTERN4 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
-def MEMSET_PATTERN8 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
+foreach Size = [4, 8, 16] in {
+  def MEMSET_PATTERN#Size : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]> {
+    let FnAttrs = [NoCallback, NoFree, NoSync, NoUnwind, WillReturn];
+    let Memory = ArgMemOnly;
+    let ParamAttrs = [[CapturesNone, WriteOnly], [CapturesNone, ReadOnly]];
+  }
+}
 def MKDIR : RuntimeLibcall<Int, [Ptr, IntX]>;
 def MKTIME : RuntimeLibcall<IntPlus, [Ptr]>;
 def MSVC_DELETE_ARRAY_PTR32 : RuntimeLibcall<Void, [Ptr]>;
diff --git a/llvm/include/llvm/IR/RuntimeLibcallsImpl.td b/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
index 03346b17fece4..da452fcc813cf 100644
--- a/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+++ b/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
@@ -159,6 +159,7 @@ class MemoryEffects<ModRefInfo mr = ModRef> {
 
 def UnknownMemory : MemoryEffects;
 def NoMemory : MemoryEffects<NoModRef>;
+def ArgMemOnly : MemoryEffects<NoModRef> { let ArgMem = ModRef; }
 def ArgMemWriteOnly : MemoryEffects<NoModRef> { let ArgMem = Mod; }
 def ErrnoMemWriteOnly : MemoryEffects<NoModRef> { let ErrnoMem = Mod; }
 
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index d1f34737fbafc..05fa1f27ebf06 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -43,7 +43,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
-#include "llvm/Transforms/Utils/BuildLibCalls.h"
 #include "llvm/Transforms/Utils/LowerMemIntrinsics.h"
 #include "llvm/Transforms/Utils/LowerVectorIntrinsics.h"
 
@@ -339,8 +338,9 @@ bool PreISelIntrinsicLowering::tryExpandBoundedMemSet(
 // 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) {
+static Constant *
+getMemSetPattern16Value(MemSetPatternInst *Inst,
+                        const RTLIB::RuntimeLibcallsInfo &RTLCI) {
   // TODO: This could check for UndefValue because it can be merged into any
   // other valid pattern.
 
@@ -351,9 +351,8 @@ static Constant *getMemSetPattern16Value(MemSetPatternInst *Inst,
   Value *V = Inst->getValue();
   Type *VTy = V->getType();
   const DataLayout &DL = Inst->getDataLayout();
-  Module *M = Inst->getModule();
 
-  if (!isLibFuncEmittable(M, &TLI, LibFunc_memset_pattern16))
+  if (!RTLCI.isAvailable(RTLIB::impl_memset_pattern16))
     return nullptr;
 
   // If the value isn't a constant, we can't promote it to being in a constant
@@ -489,8 +488,9 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
     case Intrinsic::experimental_memset_pattern: {
       auto *Memset = cast<MemSetPatternInst>(Inst);
       Function *ParentFunc = Memset->getFunction();
-      const TargetLibraryInfo &TLI = LookupTLI(*ParentFunc);
-      Constant *PatternValue = getMemSetPattern16Value(Memset, TLI);
+      const RTLIB::RuntimeLibcallsInfo &RTLCI =
+          ModuleLibcalls.getRuntimeLibcallsInfo();
+      Constant *PatternValue = getMemSetPattern16Value(Memset, RTLCI);
       if (!PatternValue) {
         // If it isn't possible to emit a memset_pattern16 libcall, expand to
         // a loop instead.
@@ -506,13 +506,9 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
       Module *M = Memset->getModule();
       const DataLayout &DL = Memset->getDataLayout();
 
-      Type *DestPtrTy = Memset->getRawDest()->getType();
-      Type *SizeTTy = TLI.getSizeTType(*M);
-      StringRef FuncName = "memset_pattern16";
-      FunctionCallee MSP = getOrInsertLibFunc(M, TLI, LibFunc_memset_pattern16,
-                                              Builder.getVoidTy(), DestPtrTy,
-                                              Builder.getPtrTy(), SizeTTy);
-      inferNonMandatoryLibFuncAttrs(M, FuncName, TLI);
+      FunctionCallee MSP =
+          RTLCI.getOrInsertLibcallDecl(*M, RTLIB::impl_memset_pattern16);
+      Type *SizeTTy = MSP.getFunctionType()->getParamType(2);
 
       // Otherwise we should form a memset_pattern16.  PatternValue is known
       // to be an constant array of 16-bytes. Put the value into a mergable
@@ -535,11 +531,13 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
       }
       Value *PatternPtr = GV;
       Value *NumBytes = Builder.CreateMul(
-          TLI.getAsSizeT(DL.getTypeAllocSize(Memset->getValue()->getType()),
-                         *M),
+          ConstantInt::get(SizeTTy,
+                           DL.getTypeAllocSize(Memset->getValue()->getType())),
           Builder.CreateZExtOrTrunc(Memset->getLength(), SizeTTy));
       CallInst *MemsetPattern16Call =
           Builder.CreateCall(MSP, {Memset->getRawDest(), PatternPtr, NumBytes});
+      MemsetPattern16Call->setCallingConv(
+          RTLCI.getLibcallImplCallingConv(RTLIB::impl_memset_pattern16));
       MemsetPattern16Call->setAAMetadata(Memset->getAAMetadata());
       // Preserve any call site attributes on the destination pointer
       // argument (e.g. alignment).
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
index e8c2f0abcbf1b..700847c0b62c2 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
@@ -19,14 +19,17 @@
 ; MACOS: declare i32 @getc_unlocked(ptr)
 ; MACOS: declare i32 @getchar_unlocked()
 
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern16(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern4(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern8(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern16(ptr, ptr, i64)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern4(ptr, ptr, i64)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern8(ptr, ptr, i64)
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern16(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS:#[0-9]+]]
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern4(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern8(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern16(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS:#[0-9]+]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern4(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern8(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS]]
 
 ; MACOS: declare i32 @putc_unlocked(i32, ptr)
 ; MACOS: declare i32 @putchar_unlocked(i32)
 
+; HAS-MEMSET-PATTERN-32: attributes [[MEMSET_PATTERN_ATTRS]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; HAS-MEMSET-PATTERN-64: attributes [[MEMSET_PATTERN_ATTRS]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+
 ; NO-MEMSET-PATTERN-NOT: memset_pattern

@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-llvm-ir

Author: Matt Arsenault (arsenm)

Changes

CodeGen passes shouldn't be using TargetLibraryInfo for functions they
will emit. Use RuntimeLibcallsInfo which knows how to insert the
correctly typed and annotated declaration.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


Full diff: https://github.com/llvm/llvm-project/pull/241384.diff

5 Files Affected:

  • (modified) llvm/include/llvm/Analysis/LibcallLoweringInfo.h (+4)
  • (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+7-3)
  • (modified) llvm/include/llvm/IR/RuntimeLibcallsImpl.td (+1)
  • (modified) llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp (+14-16)
  • (modified) llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll (+9-6)
diff --git a/llvm/include/llvm/Analysis/LibcallLoweringInfo.h b/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
index 083a86c4a9ef4..e513cd1e983a5 100644
--- a/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
+++ b/llvm/include/llvm/Analysis/LibcallLoweringInfo.h
@@ -131,6 +131,10 @@ class ModuleLibcallLoweringInfo {
 
   operator bool() const { return RTLCI != nullptr; }
 
+  const RTLIB::RuntimeLibcallsInfo &getRuntimeLibcallsInfo() const {
+    return *RTLCI;
+  }
+
   LLVM_ABI bool invalidate(Module &, const PreservedAnalyses &,
                            ModuleAnalysisManager::Invalidator &);
 
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 6d339cbd33d4f..5e497c84d6a2e 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -1105,9 +1105,13 @@ def MEMCHR : RuntimeLibcall<Ptr, [Ptr, Int, SizeT]>;
 def MEMPCPY : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT]>;
 def MEMPCPY_CHK : RuntimeLibcall<Ptr, [Ptr, Ptr, SizeT, SizeT]>;
 def MEMRCHR : RuntimeLibcall<Ptr, [Ptr, Int, SizeT]>;
-def MEMSET_PATTERN16 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
-def MEMSET_PATTERN4 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
-def MEMSET_PATTERN8 : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]>;
+foreach Size = [4, 8, 16] in {
+  def MEMSET_PATTERN#Size : RuntimeLibcall<Void, [Ptr, Ptr, SizeT]> {
+    let FnAttrs = [NoCallback, NoFree, NoSync, NoUnwind, WillReturn];
+    let Memory = ArgMemOnly;
+    let ParamAttrs = [[CapturesNone, WriteOnly], [CapturesNone, ReadOnly]];
+  }
+}
 def MKDIR : RuntimeLibcall<Int, [Ptr, IntX]>;
 def MKTIME : RuntimeLibcall<IntPlus, [Ptr]>;
 def MSVC_DELETE_ARRAY_PTR32 : RuntimeLibcall<Void, [Ptr]>;
diff --git a/llvm/include/llvm/IR/RuntimeLibcallsImpl.td b/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
index 03346b17fece4..da452fcc813cf 100644
--- a/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+++ b/llvm/include/llvm/IR/RuntimeLibcallsImpl.td
@@ -159,6 +159,7 @@ class MemoryEffects<ModRefInfo mr = ModRef> {
 
 def UnknownMemory : MemoryEffects;
 def NoMemory : MemoryEffects<NoModRef>;
+def ArgMemOnly : MemoryEffects<NoModRef> { let ArgMem = ModRef; }
 def ArgMemWriteOnly : MemoryEffects<NoModRef> { let ArgMem = Mod; }
 def ErrnoMemWriteOnly : MemoryEffects<NoModRef> { let ErrnoMem = Mod; }
 
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index d1f34737fbafc..05fa1f27ebf06 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -43,7 +43,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
-#include "llvm/Transforms/Utils/BuildLibCalls.h"
 #include "llvm/Transforms/Utils/LowerMemIntrinsics.h"
 #include "llvm/Transforms/Utils/LowerVectorIntrinsics.h"
 
@@ -339,8 +338,9 @@ bool PreISelIntrinsicLowering::tryExpandBoundedMemSet(
 // 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) {
+static Constant *
+getMemSetPattern16Value(MemSetPatternInst *Inst,
+                        const RTLIB::RuntimeLibcallsInfo &RTLCI) {
   // TODO: This could check for UndefValue because it can be merged into any
   // other valid pattern.
 
@@ -351,9 +351,8 @@ static Constant *getMemSetPattern16Value(MemSetPatternInst *Inst,
   Value *V = Inst->getValue();
   Type *VTy = V->getType();
   const DataLayout &DL = Inst->getDataLayout();
-  Module *M = Inst->getModule();
 
-  if (!isLibFuncEmittable(M, &TLI, LibFunc_memset_pattern16))
+  if (!RTLCI.isAvailable(RTLIB::impl_memset_pattern16))
     return nullptr;
 
   // If the value isn't a constant, we can't promote it to being in a constant
@@ -489,8 +488,9 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
     case Intrinsic::experimental_memset_pattern: {
       auto *Memset = cast<MemSetPatternInst>(Inst);
       Function *ParentFunc = Memset->getFunction();
-      const TargetLibraryInfo &TLI = LookupTLI(*ParentFunc);
-      Constant *PatternValue = getMemSetPattern16Value(Memset, TLI);
+      const RTLIB::RuntimeLibcallsInfo &RTLCI =
+          ModuleLibcalls.getRuntimeLibcallsInfo();
+      Constant *PatternValue = getMemSetPattern16Value(Memset, RTLCI);
       if (!PatternValue) {
         // If it isn't possible to emit a memset_pattern16 libcall, expand to
         // a loop instead.
@@ -506,13 +506,9 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
       Module *M = Memset->getModule();
       const DataLayout &DL = Memset->getDataLayout();
 
-      Type *DestPtrTy = Memset->getRawDest()->getType();
-      Type *SizeTTy = TLI.getSizeTType(*M);
-      StringRef FuncName = "memset_pattern16";
-      FunctionCallee MSP = getOrInsertLibFunc(M, TLI, LibFunc_memset_pattern16,
-                                              Builder.getVoidTy(), DestPtrTy,
-                                              Builder.getPtrTy(), SizeTTy);
-      inferNonMandatoryLibFuncAttrs(M, FuncName, TLI);
+      FunctionCallee MSP =
+          RTLCI.getOrInsertLibcallDecl(*M, RTLIB::impl_memset_pattern16);
+      Type *SizeTTy = MSP.getFunctionType()->getParamType(2);
 
       // Otherwise we should form a memset_pattern16.  PatternValue is known
       // to be an constant array of 16-bytes. Put the value into a mergable
@@ -535,11 +531,13 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
       }
       Value *PatternPtr = GV;
       Value *NumBytes = Builder.CreateMul(
-          TLI.getAsSizeT(DL.getTypeAllocSize(Memset->getValue()->getType()),
-                         *M),
+          ConstantInt::get(SizeTTy,
+                           DL.getTypeAllocSize(Memset->getValue()->getType())),
           Builder.CreateZExtOrTrunc(Memset->getLength(), SizeTTy));
       CallInst *MemsetPattern16Call =
           Builder.CreateCall(MSP, {Memset->getRawDest(), PatternPtr, NumBytes});
+      MemsetPattern16Call->setCallingConv(
+          RTLCI.getLibcallImplCallingConv(RTLIB::impl_memset_pattern16));
       MemsetPattern16Call->setAAMetadata(Memset->getAAMetadata());
       // Preserve any call site attributes on the destination pointer
       // argument (e.g. alignment).
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
index e8c2f0abcbf1b..700847c0b62c2 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/darwin.ll
@@ -19,14 +19,17 @@
 ; MACOS: declare i32 @getc_unlocked(ptr)
 ; MACOS: declare i32 @getchar_unlocked()
 
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern16(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern4(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-32: declare void @memset_pattern8(ptr, ptr, i32)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern16(ptr, ptr, i64)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern4(ptr, ptr, i64)
-; HAS-MEMSET-PATTERN-64: declare void @memset_pattern8(ptr, ptr, i64)
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern16(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS:#[0-9]+]]
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern4(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-32: declare void @memset_pattern8(ptr writeonly captures(none), ptr readonly captures(none), i32) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern16(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS:#[0-9]+]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern4(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS]]
+; HAS-MEMSET-PATTERN-64: declare void @memset_pattern8(ptr writeonly captures(none), ptr readonly captures(none), i64) [[MEMSET_PATTERN_ATTRS]]
 
 ; MACOS: declare i32 @putc_unlocked(i32, ptr)
 ; MACOS: declare i32 @putchar_unlocked(i32)
 
+; HAS-MEMSET-PATTERN-32: attributes [[MEMSET_PATTERN_ATTRS]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; HAS-MEMSET-PATTERN-64: attributes [[MEMSET_PATTERN_ATTRS]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+
 ; NO-MEMSET-PATTERN-NOT: memset_pattern

Base automatically changed from users/arsenm/codegen/require-targetmachine-preiselintrinsic-lowering to main November 11, 2026 18:23
@arsenm
arsenm force-pushed the users/arsenm/codegen/preisel-memset-pattern-runtime-libcalls branch from cf90caf to bb76979 Compare November 11, 2026 18:29
@kubamracek

kubamracek commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

LGTM.

To spell it out explicitly (maybe let's include this in the commit message?), this has a user-visible behavior change: On -ffreestanding or -fno-builtin or -fno-builtin=memset_pattern compilations or attribute no_builtin annotated functions, TLI would never emit the call, but RTLCI allows that on platforms that claim to have it. Arguably, (1) this is simply a bug in the user's code (wrong target) or in the target definition, and (2) that's the whole point and intent of this TLI->RTLCI change.

The relevance of this is that Apple/Darwin target triples do have a long history of being used for various firmware and embedded compilations with slight mismatches between LLVM's definition of the target and reality, and users are often able to solve ("paper over") the mismatches via various combinations of -ffreestanding, -fno-buildin, and attribute no_builtin. See #176272 for the current in-progress way of formalizing that. CC @ian-twilightcoder, @ahmedbougacha.

(Power users, like firmware builders, would probably find it useful to have a way to actually influence the RTLCI's set of allowed libcalls via Clang or -mllvm compilation flags for particular compilations. But that's a separate story.)

@arsenm

arsenm commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

(Power users, like firmware builders, would probably find it useful to have a way to actually influence the RTLCI's set of allowed libcalls via Clang or -mllvm compilation flags for particular compilations. But that's a separate story.)

This is what I'm working on

@ilovepi ilovepi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Similar to the other comment, I wonder if this needs to be documented someplace? Maybe a blurb in the ReleaseNotes or an FYI post on discourse?

@arsenm

arsenm commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

LGTM. Similar to the other comment, I wonder if this needs to be documented someplace? Maybe a blurb in the ReleaseNotes or an FYI post on discourse?

I don't think this comes anywhere near the level of requiring that much attention. This makes the behavior consistent with regular memset

@arsenm
arsenm enabled auto-merge (squash) November 12, 2026 22:36
CodeGen passes shouldn't be using TargetLibraryInfo for functions they
will emit. Use RuntimeLibcallsInfo which knows how to insert the
correctly typed and annotated declaration.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@arsenm
arsenm force-pushed the users/arsenm/codegen/preisel-memset-pattern-runtime-libcalls branch from bb76979 to 31a557a Compare November 12, 2026 22:57
@arsenm
arsenm disabled auto-merge November 12, 2026 23:55
@arsenm
arsenm merged commit 4d6d382 into main Nov 12, 2026
8 of 11 checks passed
@arsenm
arsenm deleted the users/arsenm/codegen/preisel-memset-pattern-runtime-libcalls branch November 12, 2026 23:56
@llvm-ci

llvm-ci commented Nov 13, 2026

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder profcheck running on profcheck-b2 while building llvm at step 5 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/223/builds/17042

Here is the relevant piece of the build log for the reference
Step 5 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/profcheck.sh --jobs=64' (failure)
...
PASS: LLVM :: CodeGen/AArch64/arm64-tls-initial-exec.ll (2607 of 47758)
PASS: LLVM :: tools/llvm-dwarfutil/ELF/X86/dwarf5-line-str.test (2608 of 47758)
PASS: LLVM :: DebugInfo/Generic/disubrange_vla_no_dbgvalue.ll (2609 of 47758)
PASS: LLVM :: CodeGen/X86/fsafdo_test3.ll (2610 of 47758)
PASS: LLVM :: ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s (2611 of 47758)
PASS: LLVM :: CodeGen/X86/bitcast-and-setcc-256.ll (2612 of 47758)
PASS: LLVM :: CodeGen/X86/select.ll (2613 of 47758)
PASS: LLVM :: CodeGen/X86/knownbits-vpmadd52.ll (2614 of 47758)
PASS: LLVM :: CodeGen/Thumb2/bf16-instructions.ll (2615 of 47758)
PASS: LLVM :: CodeGen/Mips/target-abi-module-flag.ll (2616 of 47758)
FAIL: LLVM :: Transforms/LowerTypeTests/export-inline.ll (2617 of 47758)
PASS: LLVM :: CodeGen/AArch64/fptrunc.ll (2618 of 47758)
PASS: LLVM :: CodeGen/AArch64/Atomics/aarch64-atomic-load-v8_1a.ll (2619 of 47758)
PASS: LLVM :: CodeGen/X86/sad_variations.ll (2620 of 47758)
PASS: LLVM :: CodeGen/AArch64/Atomics/aarch64-atomic-load-outline_atomics.ll (2621 of 47758)
PASS: LLVM :: CodeGen/LoongArch/alsl.ll (2622 of 47758)
PASS: LLVM :: CodeGen/X86/isel-fsub.ll (2623 of 47758)
PASS: LLVM :: CodeGen/X86/cmp-select-sign.ll (2624 of 47758)
PASS: LLVM :: CodeGen/SystemZ/atomic-store-08.ll (2625 of 47758)
PASS: LLVM :: DebugInfo/X86/dbg-merge-loc-entry.ll (2626 of 47758)
PASS: LLVM :: CodeGen/ARM/global-merge-external-2.ll (2627 of 47758)
PASS: LLVM :: CodeGen/X86/apx/push2-pop2-cfi-seh-v3.ll (2628 of 47758)
PASS: LLVM :: DebugInfo/MIR/X86/avoid-single-entry-value-location.mir (2629 of 47758)
PASS: LLVM :: CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll (2630 of 47758)
PASS: LLVM :: tools/llvm-profdata/gcc-gcov-sample-profile.test (2631 of 47758)
PASS: LLVM :: CodeGen/Mips/cmov.ll (2632 of 47758)
PASS: LLVM :: Transforms/MemProfContextDisambiguation/duplicate-context-ids2.ll (2633 of 47758)
PASS: LLVM :: CodeGen/AArch64/arm64-vabs.ll (2634 of 47758)
PASS: LLVM :: CodeGen/LoongArch/e_flags.ll (2635 of 47758)
PASS: LLVM :: CodeGen/X86/vec_usubo.ll (2636 of 47758)
PASS: LLVM :: MC/X86/AVX512F_512-32.s (2637 of 47758)
PASS: LLVM :: tools/llvm-profdata/raw-32-bits-le.test (2638 of 47758)
PASS: LLVM :: tools/llvm-dwarfutil/ELF/X86/gc-exec.test (2639 of 47758)
PASS: LLVM :: CodeGen/ARM/icmp-mask-zero.ll (2640 of 47758)
PASS: LLVM :: CodeGen/SystemZ/musttail-notail.ll (2641 of 47758)
PASS: LLVM :: CodeGen/AArch64/ptrauth-bti-call.ll (2642 of 47758)
PASS: LLVM :: Transforms/InstNamer/after-each-pass.ll (2643 of 47758)
PASS: LLVM :: CodeGen/X86/vector-reduce-fmul-fast.ll (2644 of 47758)
PASS: LLVM :: MC/AArch64/SVE/ptrues.s (2645 of 47758)
PASS: LLVM :: CodeGen/X86/vector-compare-all_of.ll (2646 of 47758)
PASS: LLVM :: CodeGen/X86/fp-strict-scalar-fptoint.ll (2647 of 47758)
PASS: LLVM :: CodeGen/X86/vector-partial-reduce-umla.ll (2648 of 47758)
PASS: LLVM :: Transforms/SLPVectorizer/X86/reassociate-ops.ll (2649 of 47758)
PASS: LLVM :: tools/llvm-split/SplitByCategory/split-with-kernel-declarations.ll (2650 of 47758)
PASS: LLVM :: CodeGen/X86/expand-vp-int-intrinsics.ll (2651 of 47758)
PASS: LLVM :: CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll (2652 of 47758)
PASS: LLVM :: CodeGen/ARM/subtarget-features-long-calls.ll (2653 of 47758)
PASS: LLVM :: CodeGen/X86/isel-fadd.ll (2654 of 47758)
PASS: LLVM :: CodeGen/AArch64/zext-shuffle.ll (2655 of 47758)
Step 7 (Ninja) failure: Ninja (failure)
...
PASS: LLVM :: CodeGen/AArch64/arm64-tls-initial-exec.ll (2607 of 47758)
PASS: LLVM :: tools/llvm-dwarfutil/ELF/X86/dwarf5-line-str.test (2608 of 47758)
PASS: LLVM :: DebugInfo/Generic/disubrange_vla_no_dbgvalue.ll (2609 of 47758)
PASS: LLVM :: CodeGen/X86/fsafdo_test3.ll (2610 of 47758)
PASS: LLVM :: ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s (2611 of 47758)
PASS: LLVM :: CodeGen/X86/bitcast-and-setcc-256.ll (2612 of 47758)
PASS: LLVM :: CodeGen/X86/select.ll (2613 of 47758)
PASS: LLVM :: CodeGen/X86/knownbits-vpmadd52.ll (2614 of 47758)
PASS: LLVM :: CodeGen/Thumb2/bf16-instructions.ll (2615 of 47758)
PASS: LLVM :: CodeGen/Mips/target-abi-module-flag.ll (2616 of 47758)
FAIL: LLVM :: Transforms/LowerTypeTests/export-inline.ll (2617 of 47758)
PASS: LLVM :: CodeGen/AArch64/fptrunc.ll (2618 of 47758)
PASS: LLVM :: CodeGen/AArch64/Atomics/aarch64-atomic-load-v8_1a.ll (2619 of 47758)
PASS: LLVM :: CodeGen/X86/sad_variations.ll (2620 of 47758)
PASS: LLVM :: CodeGen/AArch64/Atomics/aarch64-atomic-load-outline_atomics.ll (2621 of 47758)
PASS: LLVM :: CodeGen/LoongArch/alsl.ll (2622 of 47758)
PASS: LLVM :: CodeGen/X86/isel-fsub.ll (2623 of 47758)
PASS: LLVM :: CodeGen/X86/cmp-select-sign.ll (2624 of 47758)
PASS: LLVM :: CodeGen/SystemZ/atomic-store-08.ll (2625 of 47758)
PASS: LLVM :: DebugInfo/X86/dbg-merge-loc-entry.ll (2626 of 47758)
PASS: LLVM :: CodeGen/ARM/global-merge-external-2.ll (2627 of 47758)
PASS: LLVM :: CodeGen/X86/apx/push2-pop2-cfi-seh-v3.ll (2628 of 47758)
PASS: LLVM :: DebugInfo/MIR/X86/avoid-single-entry-value-location.mir (2629 of 47758)
PASS: LLVM :: CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll (2630 of 47758)
PASS: LLVM :: tools/llvm-profdata/gcc-gcov-sample-profile.test (2631 of 47758)
PASS: LLVM :: CodeGen/Mips/cmov.ll (2632 of 47758)
PASS: LLVM :: Transforms/MemProfContextDisambiguation/duplicate-context-ids2.ll (2633 of 47758)
PASS: LLVM :: CodeGen/AArch64/arm64-vabs.ll (2634 of 47758)
PASS: LLVM :: CodeGen/LoongArch/e_flags.ll (2635 of 47758)
PASS: LLVM :: CodeGen/X86/vec_usubo.ll (2636 of 47758)
PASS: LLVM :: MC/X86/AVX512F_512-32.s (2637 of 47758)
PASS: LLVM :: tools/llvm-profdata/raw-32-bits-le.test (2638 of 47758)
PASS: LLVM :: tools/llvm-dwarfutil/ELF/X86/gc-exec.test (2639 of 47758)
PASS: LLVM :: CodeGen/ARM/icmp-mask-zero.ll (2640 of 47758)
PASS: LLVM :: CodeGen/SystemZ/musttail-notail.ll (2641 of 47758)
PASS: LLVM :: CodeGen/AArch64/ptrauth-bti-call.ll (2642 of 47758)
PASS: LLVM :: Transforms/InstNamer/after-each-pass.ll (2643 of 47758)
PASS: LLVM :: CodeGen/X86/vector-reduce-fmul-fast.ll (2644 of 47758)
PASS: LLVM :: MC/AArch64/SVE/ptrues.s (2645 of 47758)
PASS: LLVM :: CodeGen/X86/vector-compare-all_of.ll (2646 of 47758)
PASS: LLVM :: CodeGen/X86/fp-strict-scalar-fptoint.ll (2647 of 47758)
PASS: LLVM :: CodeGen/X86/vector-partial-reduce-umla.ll (2648 of 47758)
PASS: LLVM :: Transforms/SLPVectorizer/X86/reassociate-ops.ll (2649 of 47758)
PASS: LLVM :: tools/llvm-split/SplitByCategory/split-with-kernel-declarations.ll (2650 of 47758)
PASS: LLVM :: CodeGen/X86/expand-vp-int-intrinsics.ll (2651 of 47758)
PASS: LLVM :: CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll (2652 of 47758)
PASS: LLVM :: CodeGen/ARM/subtarget-features-long-calls.ll (2653 of 47758)
PASS: LLVM :: CodeGen/X86/isel-fadd.ll (2654 of 47758)
PASS: LLVM :: CodeGen/AArch64/zext-shuffle.ll (2655 of 47758)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:analysis Includes value tracking, cost tables and constant folding llvm:codegen llvm:ir llvm:transforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants