diff --git a/compiler-rt/lib/builtins/riscv/int_mul_impl.inc b/compiler-rt/lib/builtins/riscv/int_mul_impl.inc --- a/compiler-rt/lib/builtins/riscv/int_mul_impl.inc +++ b/compiler-rt/lib/builtins/riscv/int_mul_impl.inc @@ -10,7 +10,6 @@ // //===----------------------------------------------------------------------===// -#if !defined(__riscv_mul) .text .align 2 @@ -28,4 +27,3 @@ slli a2, a2, 1 bnez a1, .L1 ret -#endif diff --git a/compiler-rt/test/builtins/Unit/riscv/mulsi3_test.c b/compiler-rt/test/builtins/Unit/mulsi3_test.c rename from compiler-rt/test/builtins/Unit/riscv/mulsi3_test.c rename to compiler-rt/test/builtins/Unit/mulsi3_test.c --- a/compiler-rt/test/builtins/Unit/riscv/mulsi3_test.c +++ b/compiler-rt/test/builtins/Unit/mulsi3_test.c @@ -1,13 +1,10 @@ -// REQUIRES: riscv32-target-arch // RUN: %clang_builtins %s %librt -o %t && %run %t +// REQUIRES: librt_has_mulsi3 #include "int_lib.h" #include #include -#if !defined(__riscv_mul) && __riscv_xlen == 32 -// Based on mulsi3_test.c - COMPILER_RT_ABI si_int __mulsi3(si_int a, si_int b); int test__mulsi3(si_int a, si_int b, si_int expected) @@ -18,11 +15,9 @@ a, b, __mulsi3(a, b), expected); return x != expected; } -#endif int main() { -#if !defined(__riscv_mul) && __riscv_xlen == 32 if (test__mulsi3(0, 0, 0)) return 1; if (test__mulsi3(0, 1, 0)) @@ -99,9 +94,6 @@ return 1; if (test__mulsi3(-8192, -4194303, 34359730176)) return 1; -#else - printf("skipped\n"); -#endif return 0; }