[all-commits] [llvm/llvm-project] 0781e9: [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops...

Luís Marques via All-commits all-commits at lists.llvm.org
Fri Feb 21 11:31:06 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0781e93a6eaa71ec5d87be3bbeeeed053067f7ee
      https://github.com/llvm/llvm-project/commit/0781e93a6eaa71ec5d87be3bbeeeed053067f7ee
  Author: Luís Marques <luismarques at lowrisc.org>
  Date:   2020-02-21 (Fri, 21 Feb 2020)

  Changed paths:
    M clang/test/CodeGen/atomic_ops.c

  Log Message:
  -----------
  [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V

By default the RISC-V target doesn't have the atomics standard extension
enabled. The first RUN line in `clang/test/CodeGen/atomic_ops.c` didn't
specify a target triple, which meant that on RISC-V Linux hosts it would
target RISC-V, but because it used clang cc1 we didn't get the toolchain
driver functionality to automatically turn on the extensions implied by
the target triple (riscv64-linux includes atomics). This would cause the
test to fail on RISC-V hosts.

This patch changes the test to have RUN lines for two explicit targets,
one with native atomics and one without. To work around FileCheck
limitations and more accurately match the output, some tests now have
separate prefixes for the two cases.

Reviewers: jyknight, eli.friedman, lenary, efriedma
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D74847




More information about the All-commits mailing list