[clang] d05e1e9 - [clang][test][RISCV] Check for __riscv_i in riscv-target-features.c

Alex Bradbury via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 12:32:00 PST 2023


On 2023-02-14 19:56, Craig Topper wrote:
> How does this interact with the CHECK-NOTs above it. Does it check
> that they don't appear before the __riscv_i but would be allowed after
> it?

Thanks for the post-commit review. I think you're right.

It looks like the easiest fix is probably move the __riscv_i check out
of that block of CHECK-NOTs and just add a new:

// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32i -x c -E
-dM %s \
// RUN: -o - | FileCheck %s
// RUN: %clang -target riscv64-unknown-linux-gnu -march=rv64i -x c -E
-dM %s \
// RUN: -o - | FileCheck %s
// CHECK: __riscv_i 2000000{{$}}

Do you agree, or am I missing a better alternative?

Cheers,

Alex


More information about the cfe-commits mailing list