Skip to content

Conversation

@yetingk
Copy link
Contributor

@yetingk yetingk commented May 7, 2024

PR #89727 added the two test cases to verify .option arch should only work when having -menable-experimental-extensions. And the test idea could be splitted to

  1. When having menable-experimental-extensions, clang passes +experimental.
  2. .option arch only enabled when +experimental enabled.

And we already had the two kind of tests.

PR llvm#89727 added the two test cases to verify `.option arch` should only
work when having -menable-experimental-extensions. And the test idea could be
splitted to
1. When having menable-experimental-extensions, clang passes +experimental.
2. `.option arch` only enabled when +experimental enabled.
And we already had the two kind of test.
@yetingk yetingk requested review from asb, kito-cheng and topperc May 7, 2024 13:11
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels May 7, 2024
@llvmbot
Copy link
Member

llvmbot commented May 7, 2024

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Yeting Kuo (yetingk)

Changes

PR #89727 added the two test cases to verify .option arch should only work when having -menable-experimental-extensions. And the test idea could be splitted to

  1. When having menable-experimental-extensions, clang passes +experimental.
  2. .option arch only enabled when +experimental enabled.

And we already had the two kind of tests.


Full diff: https://github.com/llvm/llvm-project/pull/91324.diff

2 Files Affected:

  • (removed) clang/test/Driver/riscv-option-arch.c (-8)
  • (removed) clang/test/Driver/riscv-option-arch.s (-6)
diff --git a/clang/test/Driver/riscv-option-arch.c b/clang/test/Driver/riscv-option-arch.c
deleted file mode 100644
index 9f0e037cd12e0..0000000000000
--- a/clang/test/Driver/riscv-option-arch.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// REQUIRES: riscv-registered-target
-// RUN: %clang --target=riscv64 -menable-experimental-extensions -c -o /dev/null %s
-// RUN: ! %clang --target=riscv64 -c -o /dev/null %s 2>&1 | FileCheck -check-prefixes=CHECK-ERR %s
-
-void foo() {
-  asm volatile (".option arch, +zicfiss");
-  // CHECK-ERR: Unexpected experimental extensions.
-}
diff --git a/clang/test/Driver/riscv-option-arch.s b/clang/test/Driver/riscv-option-arch.s
deleted file mode 100644
index c4ca4aa459ce2..0000000000000
--- a/clang/test/Driver/riscv-option-arch.s
+++ /dev/null
@@ -1,6 +0,0 @@
-# REQUIRES: riscv-registered-target
-# RUN: %clang --target=riscv64 -menable-experimental-extensions -c -o /dev/null %s
-# RUN: ! %clang --target=riscv64 -c -o /dev/null %s 2>&1 | FileCheck -check-prefixes=CHECK-ERR %s
-
-.option arch, +zicfiss
-# CHECK-ERR: Unexpected experimental extensions.

@llvmbot
Copy link
Member

llvmbot commented May 7, 2024

@llvm/pr-subscribers-backend-risc-v

Author: Yeting Kuo (yetingk)

Changes

PR #89727 added the two test cases to verify .option arch should only work when having -menable-experimental-extensions. And the test idea could be splitted to

  1. When having menable-experimental-extensions, clang passes +experimental.
  2. .option arch only enabled when +experimental enabled.

And we already had the two kind of tests.


Full diff: https://github.com/llvm/llvm-project/pull/91324.diff

2 Files Affected:

  • (removed) clang/test/Driver/riscv-option-arch.c (-8)
  • (removed) clang/test/Driver/riscv-option-arch.s (-6)
diff --git a/clang/test/Driver/riscv-option-arch.c b/clang/test/Driver/riscv-option-arch.c
deleted file mode 100644
index 9f0e037cd12e0..0000000000000
--- a/clang/test/Driver/riscv-option-arch.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// REQUIRES: riscv-registered-target
-// RUN: %clang --target=riscv64 -menable-experimental-extensions -c -o /dev/null %s
-// RUN: ! %clang --target=riscv64 -c -o /dev/null %s 2>&1 | FileCheck -check-prefixes=CHECK-ERR %s
-
-void foo() {
-  asm volatile (".option arch, +zicfiss");
-  // CHECK-ERR: Unexpected experimental extensions.
-}
diff --git a/clang/test/Driver/riscv-option-arch.s b/clang/test/Driver/riscv-option-arch.s
deleted file mode 100644
index c4ca4aa459ce2..0000000000000
--- a/clang/test/Driver/riscv-option-arch.s
+++ /dev/null
@@ -1,6 +0,0 @@
-# REQUIRES: riscv-registered-target
-# RUN: %clang --target=riscv64 -menable-experimental-extensions -c -o /dev/null %s
-# RUN: ! %clang --target=riscv64 -c -o /dev/null %s 2>&1 | FileCheck -check-prefixes=CHECK-ERR %s
-
-.option arch, +zicfiss
-# CHECK-ERR: Unexpected experimental extensions.

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yetingk yetingk merged commit 1318230 into llvm:main May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants