Author: Alexander Richardson Date: 2026-09-26T22:47:33-07:00 New Revision: 126dbd97fc5d33edf43a1fce12fb5d3ea46e5be7
URL: https://github.com/llvm/llvm-project/commit/126dbd97fc5d33edf43a1fce12fb5d3ea46e5be7 DIFF: https://github.com/llvm/llvm-project/commit/126dbd97fc5d33edf43a1fce12fb5d3ea46e5be7.diff LOG: [Clang][RISC-V] Fix lto-module-asm-abi.c on non-asserts/no-lld builds (#226752) Pass `-fno-discard-value-names` so the `entry:` label is preserved in non-asserts builds, and drop `-fuse-ld=lld` so the driver check succeeds on bots that do not have `ld.lld` installed. Fixes: bf529329b5ce ("[RISC-V][LTO] Add baseline tests for LTO inline assembly and mapping symbols (#225129)") Pull-Request: https://github.com/llvm/llvm-project/pull/226752 Added: Modified: clang/test/CodeGen/RISCV/lto-module-asm-abi.c Removed: ################################################################################ diff --git a/clang/test/CodeGen/RISCV/lto-module-asm-abi.c b/clang/test/CodeGen/RISCV/lto-module-asm-abi.c index cceafaac3ba0e..50242fdd3085d 100644 --- a/clang/test/CodeGen/RISCV/lto-module-asm-abi.c +++ b/clang/test/CodeGen/RISCV/lto-module-asm-abi.c @@ -4,7 +4,7 @@ /// Check that -march=rv64gcv -flto records +d in module asm and function /// target-features even though the driver only passes mcpu=generic-rv64 to lld. -// RUN: %clang --target=riscv64-linux-android -march=rv64gcv -flto %s -S -emit-llvm -o - \ +// RUN: %clang --target=riscv64-linux-android -march=rv64gcv -flto -fno-discard-value-names %s -S -emit-llvm -o - \ // RUN: | FileCheck %s --check-prefix=IR // IR: module asm(target_features: "{{.*}}+d{{.*}}", target_cpu: "generic-rv64") @@ -20,11 +20,11 @@ // IR-NEXT: ![[#]] = !{i32 6, !"riscv-isa", ![[#ISA:]]} // IR-NEXT: ![[#ISA]] = !{!"{{.*}}_d2p2_{{.*}}"} -// RUN: %clang --target=riscv64-linux-android -march=rv64gcv -flto -shared -nostdlib -fuse-ld=lld %s -### 2>&1 \ +// RUN: %clang --target=riscv64-linux-android -march=rv64gcv -flto -shared -nostdlib %s -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=DRIVER // DRIVER: "-cc1"{{.*}}"-target-cpu" "generic-rv64"{{.*}}"-target-feature" "+d"{{.*}}"-target-abi" "lp64d" -// DRIVER: "{{[^"]*}}ld.lld{{(\.exe)?}}" +// DRIVER: "-m" "elf64lriscv" // DRIVER-NOT: mattr // DRIVER-SAME: "-plugin-opt=mcpu=generic-rv64" // DRIVER-NOT: mattr _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
