[llvm] [IRBuilder] Refactor for intrinsics const-folding (NFC) (PR #202738)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 12:03:03 PDT 2026


================
@@ -657,27 +657,27 @@ class IRBuilderBase {
   ///
   /// If the pointer isn't an i8*, it will be converted. If alias metadata is
   /// specified, it will be added to the instruction.
-  CallInst *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size,
-                         MaybeAlign Align, bool isVolatile = false,
-                         const AAMDNodes &AAInfo = AAMDNodes()) {
+  Value *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size, MaybeAlign Align,
----------------
nikic wrote:

Can we reduce the diff a bit by keeping the side-effecting intrinsics as returning `Instruction`? CreateMemSet cannot fold away.

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


More information about the llvm-commits mailing list