[llvm] [NFC][X86] Pass ConstantInt for step size in createLoop (PR #181577)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 15 13:59:40 PST 2026


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/181577

createLoop is always called with a constant step size. Propagate the
type information so that it can be used later when deriving profile
information when possible.


>From 1e159d252d9c79ad1c750a8b62d3fe39be2058de Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 15 Feb 2026 21:59:29 +0000
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.7
---
 llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp b/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
index 662aec2c15241..4912e3d7dd6df 100644
--- a/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
+++ b/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
@@ -71,7 +71,7 @@ class X86LowerAMXIntrinsics {
   DomTreeUpdater &DTU;
   LoopInfo *LI;
   BasicBlock *createLoop(BasicBlock *Preheader, BasicBlock *Exit, Value *Bound,
-                         Value *Step, StringRef Name, IRBuilderBase &B,
+                         ConstantInt *Step, StringRef Name, IRBuilderBase &B,
                          Loop *L);
   template <bool IsTileLoad>
   Value *createTileLoadStoreLoops(BasicBlock *Start, BasicBlock *End,
@@ -103,7 +103,7 @@ class X86LowerAMXIntrinsics {
 
 BasicBlock *X86LowerAMXIntrinsics::createLoop(BasicBlock *Preheader,
                                               BasicBlock *Exit, Value *Bound,
-                                              Value *Step, StringRef Name,
+                                              ConstantInt *Step, StringRef Name,
                                               IRBuilderBase &B, Loop *L) {
   LLVMContext &Ctx = Preheader->getContext();
   BasicBlock *Header =



More information about the llvm-commits mailing list