Skip to content

Commit 2e293e6

Browse files
committed
Always use uint64_t array for special initializer
1 parent aa59871 commit 2e293e6

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

llvm/cmake/config-ix.cmake

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,7 @@ elseif (LLVM_NATIVE_ARCH MATCHES "riscv64")
579579
set(LLVM_NATIVE_ARCH RISCV)
580580
elseif (LLVM_NATIVE_ARCH STREQUAL "m68k")
581581
set(LLVM_NATIVE_ARCH M68k)
582-
elseif (LLVM_NATIVE_ARCH MATCHES "loongarch32")
583-
set(LLVM_NATIVE_ARCH LoongArch)
584-
elseif (LLVM_NATIVE_ARCH MATCHES "loongarch64")
582+
elseif (LLVM_NATIVE_ARCH MATCHES "loongarch")
585583
set(LLVM_NATIVE_ARCH LoongArch)
586584
else ()
587585
message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}")
@@ -618,21 +616,6 @@ else ()
618616
endif ()
619617
endif ()
620618

621-
foreach(i IN ITEMS 8 4)
622-
try_compile(SIZEOF_UINTPTR_T_IS_${i}
623-
SOURCE_FROM_CONTENT
624-
"test-sizeof-uintptr_t.cpp"
625-
"#include <cstdint>\n
626-
static_assert(sizeof(uintptr_t) == ${i}); int main(){}"
627-
CXX_STANDARD 17
628-
LOG_DESCRIPTION "testing sizeof(uintptr_t)")
629-
630-
if(SIZEOF_UINTPTR_T_IS_${i})
631-
set(LLVM_NATIVE_ARCH_SIZEOF_UINTPTR_T ${i})
632-
break()
633-
endif()
634-
endforeach()
635-
636619
if( MSVC )
637620
set(SHLIBEXT ".lib")
638621
set(stricmp "_stricmp")

llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,7 @@ void RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls(
588588
PredicateSorter.insert(
589589
PredicateWithCC()); // No predicate or CC override first.
590590

591-
constexpr unsigned BitsPerStorageElt =
592-
LLVM_NATIVE_ARCH_SIZEOF_UINTPTR_T * CHAR_BIT;
593-
591+
constexpr unsigned BitsPerStorageElt = 64;
594592
DenseMap<PredicateWithCC, LibcallsWithCC> Pred2Funcs;
595593

596594
SmallVector<uintptr_t, 32> BitsetValues(

0 commit comments

Comments
 (0)