[llvm-branch-commits] [llvm] RuntimeLibcalls: Use the correct target C long width for Long (PR #237482)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 30 21:36:26 PDT 2026


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/237482

Long and ULong were mapped to the int width, which is wrong on LP64
targets (e.g. scalbln was declared taking i32 on x86_64 linux) and on
16-bit targets where long is 32 bits.

Also fix strtoul, strtoull, and the unsigned long operator new/delete
variants to use the unsigned types.

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

>From 6d7ee4ad8aed171d0f719a458fe3f6d7ad74c4f7 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Tue, 20 Oct 2026 09:07:44 +0200
Subject: [PATCH] RuntimeLibcalls: Use the correct target C long width for Long

Long and ULong were mapped to the int width, which is wrong on LP64
targets (e.g. scalbln was declared taking i32 on x86_64 linux) and on
16-bit targets where long is 32 bits.

Also fix strtoul, strtoull, and the unsigned long operator new/delete
variants to use the unsigned types.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
---
 llvm/include/llvm/IR/RuntimeLibcalls.td       | 44 +++++++++----------
 llvm/lib/IR/RuntimeLibcalls.cpp               | 21 ++++++---
 .../Util/DeclareRuntimeLibcalls/aarch64.ll    | 16 +++----
 .../Util/DeclareRuntimeLibcalls/avr.ll        |  4 +-
 .../Util/DeclareRuntimeLibcalls/basic.ll      |  6 +--
 .../Util/DeclareRuntimeLibcalls/bsd.ll        | 18 ++++----
 .../Util/DeclareRuntimeLibcalls/mips.ll       |  6 +--
 .../Util/DeclareRuntimeLibcalls/msp430.ll     |  4 +-
 .../Util/DeclareRuntimeLibcalls/ppc.ll        | 12 ++---
 .../Util/DeclareRuntimeLibcalls/riscv.ll      |  6 +--
 .../Util/DeclareRuntimeLibcalls/sparc.ll      |  6 +--
 .../Util/DeclareRuntimeLibcalls/systemz.ll    | 12 ++---
 .../Util/DeclareRuntimeLibcalls/windows.ll    |  6 +--
 13 files changed, 84 insertions(+), 77 deletions(-)

diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 486fcf3c69ac40..ce6a3d4e90ef05 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -1094,8 +1094,8 @@ def STRTOK_R : RuntimeLibcall<Ptr, [Ptr, Ptr, Ptr]>;
 def STRTOL : RuntimeLibcall<Long, [Ptr, Ptr, Int]>;
 def STRTOLD : RuntimeLibcall<LDbl, [Ptr, Ptr]>;
 def STRTOLL : RuntimeLibcall<LLong, [Ptr, Ptr, Int]>;
-def STRTOUL : RuntimeLibcall<Long, [Ptr, Ptr, Int]>;
-def STRTOULL : RuntimeLibcall<LLong, [Ptr, Ptr, Int]>;
+def STRTOUL : RuntimeLibcall<ULong, [Ptr, Ptr, Int]>;
+def STRTOULL : RuntimeLibcall<ULLong, [Ptr, Ptr, Int]>;
 def STRXFRM : RuntimeLibcall<SizeT, [Ptr, Ptr, SizeT]>;
 def SYSTEM : RuntimeLibcall<Int, [Ptr]>;
 def TERMINATE : RuntimeLibcall<Void, []>;
@@ -1130,16 +1130,16 @@ def WRITE : RuntimeLibcall<SSizeT, [Int, Ptr, SizeT]>;
 def ZDAPV : RuntimeLibcall<Void, [Ptr]>;
 def ZDAPVJ : RuntimeLibcall<Void, [Ptr, UInt]>;
 def ZDAPVJST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, UInt, UInt]>;
-def ZDAPVM : RuntimeLibcall<Void, [Ptr, Long]>;
-def ZDAPVMST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, Long, Long]>;
+def ZDAPVM : RuntimeLibcall<Void, [Ptr, ULong]>;
+def ZDAPVMST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, ULong, ULong]>;
 def ZDAPVRKST9NOTHROW_T : RuntimeLibcall<Void, [Ptr, Ptr]>;
 def ZDAPVST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, IntPlus]>;
 def ZDAPVST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Void, [Ptr, IntPlus, Ptr]>;
 def ZDLPV : RuntimeLibcall<Void, [Ptr]>;
 def ZDLPVJ : RuntimeLibcall<Void, [Ptr, UInt]>;
 def ZDLPVJST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, UInt, UInt]>;
-def ZDLPVM : RuntimeLibcall<Void, [Ptr, Long]>;
-def ZDLPVMST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, Long, Long]>;
+def ZDLPVM : RuntimeLibcall<Void, [Ptr, ULong]>;
+def ZDLPVMST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, ULong, ULong]>;
 def ZDLPVRKST9NOTHROW_T : RuntimeLibcall<Void, [Ptr, Ptr]>;
 def ZDLPVST11ALIGN_VAL_T : RuntimeLibcall<Void, [Ptr, IntPlus]>;
 def ZDLPVST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Void, [Ptr, IntPlus, Ptr]>;
@@ -1147,26 +1147,26 @@ def ZNAJ : RuntimeLibcall<Ptr, [UInt]>;
 def ZNAJRKST9NOTHROW_T : RuntimeLibcall<Ptr, [UInt, Ptr]>;
 def ZNAJST11ALIGN_VAL_T : RuntimeLibcall<Ptr, [UInt, UInt]>;
 def ZNAJST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Ptr, [UInt, UInt, Ptr]>;
-def ZNAM : RuntimeLibcall<Ptr, [Long]>;
-def ZNAM12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Bool]>;
-def ZNAMRKST9NOTHROW_T : RuntimeLibcall<Ptr, [Long, Ptr]>;
-def ZNAMRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Ptr, Bool]>;
-def ZNAMST11ALIGN_VAL_T : RuntimeLibcall<Ptr, [Long, Long]>;
-def ZNAMST11ALIGN_VAL_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Long, Bool]>;
-def ZNAMST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Ptr, [Long, Long, Ptr]>;
-def ZNAMST11ALIGN_VAL_TRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Long, Ptr, Bool]>;
+def ZNAM : RuntimeLibcall<Ptr, [ULong]>;
+def ZNAM12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, Bool]>;
+def ZNAMRKST9NOTHROW_T : RuntimeLibcall<Ptr, [ULong, Ptr]>;
+def ZNAMRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, Ptr, Bool]>;
+def ZNAMST11ALIGN_VAL_T : RuntimeLibcall<Ptr, [ULong, ULong]>;
+def ZNAMST11ALIGN_VAL_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, ULong, Bool]>;
+def ZNAMST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Ptr, [ULong, ULong, Ptr]>;
+def ZNAMST11ALIGN_VAL_TRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, ULong, Ptr, Bool]>;
 def ZNWJ : RuntimeLibcall<Ptr, [UInt]>;
 def ZNWJRKST9NOTHROW_T : RuntimeLibcall<Ptr, [UInt, Ptr]>;
 def ZNWJST11ALIGN_VAL_T : RuntimeLibcall<Ptr, [UInt, UInt]>;
 def ZNWJST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Ptr, [UInt, UInt, Ptr]>;
-def ZNWM : RuntimeLibcall<Ptr, [Long]>;
-def ZNWM12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Bool]>;
-def ZNWMRKST9NOTHROW_T : RuntimeLibcall<Ptr, [Long, Ptr]>;
-def ZNWMRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Ptr, Bool]>;
-def ZNWMST11ALIGN_VAL_T : RuntimeLibcall<Ptr, [Long, Long]>;
-def ZNWMST11ALIGN_VAL_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Long, Bool]>;
-def ZNWMST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Ptr, [Long, Long, Ptr]>;
-def ZNWMST11ALIGN_VAL_TRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [Long, Long, Ptr, Bool]>;
+def ZNWM : RuntimeLibcall<Ptr, [ULong]>;
+def ZNWM12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, Bool]>;
+def ZNWMRKST9NOTHROW_T : RuntimeLibcall<Ptr, [ULong, Ptr]>;
+def ZNWMRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, Ptr, Bool]>;
+def ZNWMST11ALIGN_VAL_T : RuntimeLibcall<Ptr, [ULong, ULong]>;
+def ZNWMST11ALIGN_VAL_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, ULong, Bool]>;
+def ZNWMST11ALIGN_VAL_TRKST9NOTHROW_T : RuntimeLibcall<Ptr, [ULong, ULong, Ptr]>;
+def ZNWMST11ALIGN_VAL_TRKST9NOTHROW_T12__HOT_COLD_T : RuntimeLibcall<Ptr, [ULong, ULong, Ptr, Bool]>;
 def KMPC_ALLOC_SHARED : RuntimeLibcall<Ptr, [SizeT]>;
 def KMPC_FREE_SHARED : RuntimeLibcall<Void, [Ptr, SizeT]>;
 
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index cd997bc103c1ce..2509b79271d392 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -192,6 +192,12 @@ static IntegerType *getSizeTType(LLVMContext &Ctx, const DataLayout &DL) {
   return DL.getIndexType(Ctx, /*AddressSpace=*/0);
 }
 
+static unsigned getLongSize(const Triple &TT, const DataLayout &DL) {
+  if (TT.isOSWindowsOrUEFI() && !TT.isWindowsCygwinEnvironment())
+    return 32;
+  return std::max(32u, DL.getPointerSizeInBits(/*AS=*/0));
+}
+
 // TODO: NoCallback probably unsafe in general
 static constexpr Attribute::AttrKind CommonFnAttrs[] = {
     Attribute::NoCallback, Attribute::NoFree, Attribute::NoSync,
@@ -215,9 +221,9 @@ static Type *getLongDoubleType(LLVMContext &Ctx, LongDoubleFormat Format) {
 }
 
 static std::pair<Type *, Attribute>
-convertToIRTypeAndAttr(FuncArgTypeID ID, LLVMContext &Ctx, const DataLayout &DL,
-                       unsigned IntBits, LongDoubleFormat LdblFormat) {
-
+convertToIRTypeAndAttr(FuncArgTypeID ID, LLVMContext &Ctx, const Triple &TT,
+                       const DataLayout &DL, unsigned IntBits,
+                       LongDoubleFormat LdblFormat) {
   // FIXME: Use the llvm/ABI library to get accurate IR types and attributes.
   switch (ID) {
   case Void:
@@ -237,11 +243,12 @@ convertToIRTypeAndAttr(FuncArgTypeID ID, LLVMContext &Ctx, const DataLayout &DL,
   case UInt:
   case IntPlus:
   case UIntPlus:
-  case Long:
-  case ULong:
   case IntX:
   case UIntX:
     return {IntegerType::get(Ctx, IntBits), Attribute()};
+  case Long:
+  case ULong:
+    return {IntegerType::get(Ctx, getLongSize(TT, DL)), Attribute()};
   case Int64:
   case UInt64:
   case LLong:
@@ -371,7 +378,7 @@ RuntimeLibcallsInfo::getDefaultFunctionTy(
 
   FuncArgTypeID LastID = ProtoTypes[0];
   auto [RetTy, RetAttr] =
-      convertToIRTypeAndAttr(LastID, Ctx, DL, IntBits, LongDoubleFmt);
+      convertToIRTypeAndAttr(LastID, Ctx, TT, DL, IntBits, LongDoubleFmt);
   if (RetAttr.isValid())
     Attrs = Attrs.addRetAttribute(Ctx, RetAttr);
   if (Attribute::AttrKind AK =
@@ -397,7 +404,7 @@ RuntimeLibcallsInfo::getDefaultFunctionTy(
       LastID = TyID;
 
     auto [ArgTy, ArgAttr] =
-        convertToIRTypeAndAttr(TyID, Ctx, DL, IntBits, LongDoubleFmt);
+        convertToIRTypeAndAttr(TyID, Ctx, TT, DL, IntBits, LongDoubleFmt);
     ArgTys.push_back(ArgTy);
     if (ArgAttr.isValid())
       Attrs = Attrs.addParamAttribute(Ctx, Idx - 1, ArgAttr);
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
index 6db764578e3e3f..a364011b48751a 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
@@ -561,9 +561,9 @@
 ; LINUX-NEXT: declare fp128 @roundevenl(fp128)
 ; LINUX-NEXT: declare float @roundf(float)
 ; LINUX-NEXT: declare fp128 @roundl(fp128)
-; LINUX-NEXT: declare double @scalbln(double, i32)
-; LINUX-NEXT: declare float @scalblnf(float, i32)
-; LINUX-NEXT: declare fp128 @scalblnl(fp128, i32)
+; LINUX-NEXT: declare double @scalbln(double, i64)
+; LINUX-NEXT: declare float @scalblnf(float, i64)
+; LINUX-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; LINUX-NEXT: declare double @scalbn(double, i32)
 ; LINUX-NEXT: declare float @scalbnf(float, i32)
 ; LINUX-NEXT: declare fp128 @scalbnl(fp128, i32)
@@ -1104,8 +1104,8 @@
 ; DARWIN-NEXT: declare double @roundeven(double)
 ; DARWIN-NEXT: declare float @roundevenf(float)
 ; DARWIN-NEXT: declare float @roundf(float)
-; DARWIN-NEXT: declare double @scalbln(double, i32)
-; DARWIN-NEXT: declare float @scalblnf(float, i32)
+; DARWIN-NEXT: declare double @scalbln(double, i64)
+; DARWIN-NEXT: declare float @scalblnf(float, i64)
 ; DARWIN-NEXT: declare double @scalbn(double, i32)
 ; DARWIN-NEXT: declare float @scalbnf(float, i32)
 ; DARWIN-NEXT: declare double @sin(double)
@@ -2735,9 +2735,9 @@
 ; ANDROID-NEXT: declare fp128 @roundevenl(fp128)
 ; ANDROID-NEXT: declare float @roundf(float)
 ; ANDROID-NEXT: declare fp128 @roundl(fp128)
-; ANDROID-NEXT: declare double @scalbln(double, i32)
-; ANDROID-NEXT: declare float @scalblnf(float, i32)
-; ANDROID-NEXT: declare fp128 @scalblnl(fp128, i32)
+; ANDROID-NEXT: declare double @scalbln(double, i64)
+; ANDROID-NEXT: declare float @scalblnf(float, i64)
+; ANDROID-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; ANDROID-NEXT: declare double @scalbn(double, i32)
 ; ANDROID-NEXT: declare float @scalbnf(float, i32)
 ; ANDROID-NEXT: declare fp128 @scalbnl(fp128, i32)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/avr.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/avr.ll
index 691b7fee27df17..4ab1043b9166db 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/avr.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/avr.ll
@@ -383,8 +383,8 @@
 ; CHECK-NEXT: declare double @roundeven(double) addrspace(1)
 ; CHECK-NEXT: declare float @roundevenf(float) addrspace(1)
 ; CHECK-NEXT: declare float @roundf(float) addrspace(1)
-; CHECK-NEXT: declare double @scalbln(double, i16) addrspace(1)
-; CHECK-NEXT: declare float @scalblnf(float, i16) addrspace(1)
+; CHECK-NEXT: declare double @scalbln(double, i32) addrspace(1)
+; CHECK-NEXT: declare float @scalblnf(float, i32) addrspace(1)
 ; CHECK-NEXT: declare double @scalbn(double, i16) addrspace(1)
 ; CHECK-NEXT: declare float @scalbnf(float, i16) addrspace(1)
 ; CHECK-NEXT: declare float @sin(float) addrspace(1)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll
index 1ac7a180a2e7e7..02c8ddcf8691aa 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/basic.ll
@@ -47,9 +47,9 @@ define float @sinf(float %x) {
 ; CHECK: declare float @remquof(float, float, ptr)
 ; CHECK: declare x86_fp80 @remquol(x86_fp80, x86_fp80, ptr)
 
-; CHECK: declare double @scalbln(double, i32)
-; CHECK: declare float @scalblnf(float, i32)
-; CHECK: declare x86_fp80 @scalblnl(x86_fp80, i32)
+; CHECK: declare double @scalbln(double, i64)
+; CHECK: declare float @scalblnf(float, i64)
+; CHECK: declare x86_fp80 @scalblnl(x86_fp80, i64)
 
 ; CHECK: declare double @scalbn(double, i32)
 ; CHECK: declare float @scalbnf(float, i32)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
index 8a811689f96ed7..409ca6ee19bfcd 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
@@ -509,9 +509,9 @@
 ; LINUX-NEXT: declare float @roundf(float)
 ; LINUX-NEXT: declare fp128 @roundf128(fp128)
 ; LINUX-NEXT: declare x86_fp80 @roundl(x86_fp80)
-; LINUX-NEXT: declare double @scalbln(double, i32)
-; LINUX-NEXT: declare float @scalblnf(float, i32)
-; LINUX-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i32)
+; LINUX-NEXT: declare double @scalbln(double, i64)
+; LINUX-NEXT: declare float @scalblnf(float, i64)
+; LINUX-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i64)
 ; LINUX-NEXT: declare double @scalbn(double, i32)
 ; LINUX-NEXT: declare float @scalbnf(float, i32)
 ; LINUX-NEXT: declare x86_fp80 @scalbnl(x86_fp80, i32)
@@ -1011,9 +1011,9 @@
 ; FREEBSD-NEXT: declare x86_fp80 @roundevenl(x86_fp80)
 ; FREEBSD-NEXT: declare float @roundf(float)
 ; FREEBSD-NEXT: declare x86_fp80 @roundl(x86_fp80)
-; FREEBSD-NEXT: declare double @scalbln(double, i32)
-; FREEBSD-NEXT: declare float @scalblnf(float, i32)
-; FREEBSD-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i32)
+; FREEBSD-NEXT: declare double @scalbln(double, i64)
+; FREEBSD-NEXT: declare float @scalblnf(float, i64)
+; FREEBSD-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i64)
 ; FREEBSD-NEXT: declare double @scalbn(double, i32)
 ; FREEBSD-NEXT: declare float @scalbnf(float, i32)
 ; FREEBSD-NEXT: declare x86_fp80 @scalbnl(x86_fp80, i32)
@@ -1503,9 +1503,9 @@
 ; OPENBSD-NEXT: declare x86_fp80 @roundevenl(x86_fp80)
 ; OPENBSD-NEXT: declare float @roundf(float)
 ; OPENBSD-NEXT: declare x86_fp80 @roundl(x86_fp80)
-; OPENBSD-NEXT: declare double @scalbln(double, i32)
-; OPENBSD-NEXT: declare float @scalblnf(float, i32)
-; OPENBSD-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i32)
+; OPENBSD-NEXT: declare double @scalbln(double, i64)
+; OPENBSD-NEXT: declare float @scalblnf(float, i64)
+; OPENBSD-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i64)
 ; OPENBSD-NEXT: declare double @scalbn(double, i32)
 ; OPENBSD-NEXT: declare float @scalbnf(float, i32)
 ; OPENBSD-NEXT: declare x86_fp80 @scalbnl(x86_fp80, i32)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/mips.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/mips.ll
index ece041c7878826..53695ff68c84a6 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/mips.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/mips.ll
@@ -860,9 +860,9 @@
 ; MIPS64-NEXT: declare fp128 @roundevenl(fp128)
 ; MIPS64-NEXT: declare float @roundf(float)
 ; MIPS64-NEXT: declare fp128 @roundl(fp128)
-; MIPS64-NEXT: declare double @scalbln(double, i32 signext)
-; MIPS64-NEXT: declare float @scalblnf(float, i32 signext)
-; MIPS64-NEXT: declare fp128 @scalblnl(fp128, i32 signext)
+; MIPS64-NEXT: declare double @scalbln(double, i64)
+; MIPS64-NEXT: declare float @scalblnf(float, i64)
+; MIPS64-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; MIPS64-NEXT: declare double @scalbn(double, i32 signext)
 ; MIPS64-NEXT: declare float @scalbnf(float, i32 signext)
 ; MIPS64-NEXT: declare fp128 @scalbnl(fp128, i32 signext)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/msp430.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/msp430.ll
index 9ba894924d3b77..3b4baff8dbb6d2 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/msp430.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/msp430.ll
@@ -435,8 +435,8 @@
 ; CHECK-NEXT: declare double @roundeven(double)
 ; CHECK-NEXT: declare float @roundevenf(float)
 ; CHECK-NEXT: declare float @roundf(float)
-; CHECK-NEXT: declare double @scalbln(double, i16)
-; CHECK-NEXT: declare float @scalblnf(float, i16)
+; CHECK-NEXT: declare double @scalbln(double, i32)
+; CHECK-NEXT: declare float @scalblnf(float, i32)
 ; CHECK-NEXT: declare double @scalbn(double, i16)
 ; CHECK-NEXT: declare float @scalbnf(float, i16)
 ; CHECK-NEXT: declare double @sin(double)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
index d245c115b768f3..1193dfe682b7ed 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
@@ -1071,9 +1071,9 @@
 ; AIX64-NEXT: declare float @roundf(float)
 ; AIX64-NEXT: declare fp128 @roundf128(fp128)
 ; AIX64-NEXT: declare double @roundl(double)
-; AIX64-NEXT: declare double @scalbln(double, i32 signext)
-; AIX64-NEXT: declare float @scalblnf(float, i32 signext)
-; AIX64-NEXT: declare double @scalblnl(double, i32 signext)
+; AIX64-NEXT: declare double @scalbln(double, i64)
+; AIX64-NEXT: declare float @scalblnf(float, i64)
+; AIX64-NEXT: declare double @scalblnl(double, i64)
 ; AIX64-NEXT: declare double @scalbn(double, i32 signext)
 ; AIX64-NEXT: declare float @scalbnf(float, i32 signext)
 ; AIX64-NEXT: declare double @scalbnl(double, i32 signext)
@@ -1619,9 +1619,9 @@
 ; LINUX-NEXT: declare float @roundf(float)
 ; LINUX-NEXT: declare fp128 @roundf128(fp128)
 ; LINUX-NEXT: declare ppc_fp128 @roundl(ppc_fp128)
-; LINUX-NEXT: declare double @scalbln(double, i32 signext)
-; LINUX-NEXT: declare float @scalblnf(float, i32 signext)
-; LINUX-NEXT: declare ppc_fp128 @scalblnl(ppc_fp128, i32 signext)
+; LINUX-NEXT: declare double @scalbln(double, i64)
+; LINUX-NEXT: declare float @scalblnf(float, i64)
+; LINUX-NEXT: declare ppc_fp128 @scalblnl(ppc_fp128, i64)
 ; LINUX-NEXT: declare double @scalbn(double, i32 signext)
 ; LINUX-NEXT: declare float @scalbnf(float, i32 signext)
 ; LINUX-NEXT: declare ppc_fp128 @scalbnl(ppc_fp128, i32 signext)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/riscv.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/riscv.ll
index ce6f488866c701..bd8e7f8ddce709 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/riscv.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/riscv.ll
@@ -917,9 +917,9 @@
 ; RV64-NEXT: declare fp128 @roundevenl(fp128)
 ; RV64-NEXT: declare float @roundf(float)
 ; RV64-NEXT: declare fp128 @roundl(fp128)
-; RV64-NEXT: declare double @scalbln(double, i32 signext)
-; RV64-NEXT: declare float @scalblnf(float, i32 signext)
-; RV64-NEXT: declare fp128 @scalblnl(fp128, i32 signext)
+; RV64-NEXT: declare double @scalbln(double, i64)
+; RV64-NEXT: declare float @scalblnf(float, i64)
+; RV64-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; RV64-NEXT: declare double @scalbn(double, i32 signext)
 ; RV64-NEXT: declare float @scalbnf(float, i32 signext)
 ; RV64-NEXT: declare fp128 @scalbnl(fp128, i32 signext)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll
index 629532b9006360..456f71a066ebb2 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sparc.ll
@@ -925,9 +925,9 @@
 ; SPARC64-NEXT: declare fp128 @roundevenl(fp128)
 ; SPARC64-NEXT: declare float @roundf(float)
 ; SPARC64-NEXT: declare fp128 @roundl(fp128)
-; SPARC64-NEXT: declare double @scalbln(double, i32 signext)
-; SPARC64-NEXT: declare float @scalblnf(float, i32 signext)
-; SPARC64-NEXT: declare fp128 @scalblnl(fp128, i32 signext)
+; SPARC64-NEXT: declare double @scalbln(double, i64)
+; SPARC64-NEXT: declare float @scalblnf(float, i64)
+; SPARC64-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; SPARC64-NEXT: declare double @scalbn(double, i32 signext)
 ; SPARC64-NEXT: declare float @scalbnf(float, i32 signext)
 ; SPARC64-NEXT: declare fp128 @scalbnl(fp128, i32 signext)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll
index 97890b1c101de7..9981811a4fb6f5 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/systemz.ll
@@ -445,9 +445,9 @@
 ; LINUX-NEXT: declare fp128 @roundevenl(fp128)
 ; LINUX-NEXT: declare float @roundf(float)
 ; LINUX-NEXT: declare fp128 @roundl(fp128)
-; LINUX-NEXT: declare double @scalbln(double, i32 signext)
-; LINUX-NEXT: declare float @scalblnf(float, i32 signext)
-; LINUX-NEXT: declare fp128 @scalblnl(fp128, i32 signext)
+; LINUX-NEXT: declare double @scalbln(double, i64)
+; LINUX-NEXT: declare float @scalblnf(float, i64)
+; LINUX-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; LINUX-NEXT: declare double @scalbn(double, i32 signext)
 ; LINUX-NEXT: declare float @scalbnf(float, i32 signext)
 ; LINUX-NEXT: declare fp128 @scalbnl(fp128, i32 signext)
@@ -1025,9 +1025,9 @@
 ; ZOS-NEXT: declare fp128 @roundevenl(fp128)
 ; ZOS-NEXT: declare float @roundf(float)
 ; ZOS-NEXT: declare fp128 @roundl(fp128)
-; ZOS-NEXT: declare double @scalbln(double, i32 signext)
-; ZOS-NEXT: declare float @scalblnf(float, i32 signext)
-; ZOS-NEXT: declare fp128 @scalblnl(fp128, i32 signext)
+; ZOS-NEXT: declare double @scalbln(double, i64)
+; ZOS-NEXT: declare float @scalblnf(float, i64)
+; ZOS-NEXT: declare fp128 @scalblnl(fp128, i64)
 ; ZOS-NEXT: declare double @scalbn(double, i32 signext)
 ; ZOS-NEXT: declare float @scalbnf(float, i32 signext)
 ; ZOS-NEXT: declare fp128 @scalbnl(fp128, i32 signext)
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
index cea2fef5d1a03c..57d4b1e6ef6dd3 100644
--- a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
@@ -1441,9 +1441,9 @@
 ; CYGWIN-NEXT: declare x86_fp80 @roundevenl(x86_fp80)
 ; CYGWIN-NEXT: declare float @roundf(float)
 ; CYGWIN-NEXT: declare x86_fp80 @roundl(x86_fp80)
-; CYGWIN-NEXT: declare double @scalbln(double, i32)
-; CYGWIN-NEXT: declare float @scalblnf(float, i32)
-; CYGWIN-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i32)
+; CYGWIN-NEXT: declare double @scalbln(double, i64)
+; CYGWIN-NEXT: declare float @scalblnf(float, i64)
+; CYGWIN-NEXT: declare x86_fp80 @scalblnl(x86_fp80, i64)
 ; CYGWIN-NEXT: declare double @scalbn(double, i32)
 ; CYGWIN-NEXT: declare float @scalbnf(float, i32)
 ; CYGWIN-NEXT: declare x86_fp80 @scalbnl(x86_fp80, i32)



More information about the llvm-branch-commits mailing list