diff --git a/numpy/_core/include/numpy/npy_cpu.h b/numpy/_core/include/numpy/npy_cpu.h index 67a9d0b2cdc8..4fb3fb406869 100644 --- a/numpy/_core/include/numpy/npy_cpu.h +++ b/numpy/_core/include/numpy/npy_cpu.h @@ -109,7 +109,7 @@ #elif __riscv_xlen == 32 #define NPY_CPU_RISCV32 #endif -#elif defined(__loongarch64) +#elif defined(__loongarch_lp64) #define NPY_CPU_LOONGARCH64 #elif defined(__EMSCRIPTEN__) /* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */ diff --git a/numpy/_core/src/common/npy_cpu_features.c b/numpy/_core/src/common/npy_cpu_features.c index 69e426873c41..6bdf0122cf3a 100644 --- a/numpy/_core/src/common/npy_cpu_features.c +++ b/numpy/_core/src/common/npy_cpu_features.c @@ -668,7 +668,7 @@ npy__cpu_init_features(void) /***************** LoongArch ******************/ -#elif defined(__loongarch64) +#elif defined(__loongarch_lp64) #include #include @@ -685,7 +685,6 @@ npy__cpu_init_features(void) } } - /***************** ARM ******************/ #elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM64)