[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: The clang/test/Driver codegen tests might have been removed. Note: clang/test/Driver is to test how clangDriver passes options to cc1, not for sema/codegen/etc. https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Yeting Kuo via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang --target=riscv64 -menable-experimental-extensions -c -o /dev/null %s yetingk wrote: Yes. I am sorry that I didn't find out the obvious mistake. I am going to review my development process.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Yeting Kuo via cfe-commits
@@ -0,0 +1,7 @@ +// 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 yetingk wrote: Thank you. I will fix this if

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang --target=riscv64 -menable-experimental-extensions -c -o /dev/null %s jrtc27 wrote: Why are these clang tests? This is entirely testing llvm/ code. Never mind the weirdness of putting them in Driver/, nor the fact that they’re

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,7 @@ +// 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 jrtc27 wrote: Use not rather than !

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Yeting Kuo via cfe-commits
yetingk wrote: @pogo59 Thank you for the advise. I will update the test cases. https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-07 Thread Yeting Kuo via cfe-commits
yetingk wrote: @zmodem very thank you for the help. https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-06 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Driver tests are supposed to verify Driver behavior. That is, use `-###` and make sure the correct option is being passed down to the compiler. They should not be compiling anything. https://github.com/llvm/llvm-project/pull/89727 ___

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-06 Thread via cfe-commits
zmodem wrote: 6217abc should fix the test failures. https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-06 Thread via cfe-commits
dyung wrote: @yetingk, the two tests you added are failing on a couple of build bots: - https://lab.llvm.org/buildbot/#/builders/164/builds/51995 - https://lab.llvm.org/buildbot/#/builders/258/builds/17867 - https://lab.llvm.org/buildbot/#/builders/91/builds/25943 -

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-05 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk closed https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-04 Thread Yeting Kuo via cfe-commits
yetingk wrote: @topperc Sorry, there was a quick fix after the approve. `getTargetFeatureForExtension` could approve the extension with version. It may be better to allow them, but I am not sure the error message could be enough readable if we use wrong version number and is the format of

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-04 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/6] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-03 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-01 Thread Yeting Kuo via cfe-commits
@@ -51,7 +51,6 @@ STATISTIC(RISCVNumInstrsCompressed, static cl::opt AddBuildAttributes("riscv-add-build-attributes", cl::init(false)); - yetingk wrote: Done. https://github.com/llvm/llvm-project/pull/89727

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-01 Thread Yeting Kuo via cfe-commits
@@ -2824,8 +2826,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string Feature =

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-01 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/5] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-01 Thread Craig Topper via cfe-commits
@@ -51,7 +51,6 @@ STATISTIC(RISCVNumInstrsCompressed, static cl::opt AddBuildAttributes("riscv-add-build-attributes", cl::init(false)); - topperc wrote: Unrelated change?

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-01 Thread Craig Topper via cfe-commits
@@ -2824,8 +2826,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string Feature =

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-29 Thread Yeting Kuo via cfe-commits
@@ -169,6 +169,9 @@ void riscv::getRISCVTargetFeatures(const Driver , const llvm::Triple , Features.push_back("-relax"); } + if (!Args.hasArg(options::OPT_menable_experimental_extensions)) +Features.push_back("+no-experimental-ext"); yetingk

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-29 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/4] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-29 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-29 Thread Craig Topper via cfe-commits
@@ -169,6 +169,9 @@ void riscv::getRISCVTargetFeatures(const Driver , const llvm::Triple , Features.push_back("-relax"); } + if (!Args.hasArg(options::OPT_menable_experimental_extensions)) +Features.push_back("+no-experimental-ext"); topperc

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-29 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/4] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-25 Thread Yeting Kuo via cfe-commits
yetingk wrote: I fix the issue by using feature to control the permission of experimental extension. > Does this disable use of experimental extensions for a `.option arch` in an > inline assembly block without -menable-experimental-extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-25 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/4] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-25 Thread Yeting Kuo via cfe-commits
yetingk wrote: > Does this disable use of experimental extensions for a `.option arch` in an > inline assembly block without -menable-experimental-extensions. No. my patch could not block the case. I will try to think this problem after my sleep.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-25 Thread Craig Topper via cfe-commits
topperc wrote: Does this disable use of experimental extensions for a `.option arch` in an inline assembly block? https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-24 Thread Yeting Kuo via cfe-commits
@@ -2824,8 +2827,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string & =

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-24 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/3] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Craig Topper via cfe-commits
@@ -2824,8 +2827,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string & =

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Yeting Kuo via cfe-commits
@@ -2824,8 +2827,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string & =

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Yeting Kuo via cfe-commits
@@ -51,6 +51,9 @@ STATISTIC(RISCVNumInstrsCompressed, static cl::opt AddBuildAttributes("riscv-add-build-attributes", cl::init(false)); +static cl::opt +DisableExperimentalExtension("riscv-disable-experimental-ext",

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Craig Topper via cfe-commits
@@ -2824,8 +2827,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string & =

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Craig Topper via cfe-commits
@@ -51,6 +51,9 @@ STATISTIC(RISCVNumInstrsCompressed, static cl::opt AddBuildAttributes("riscv-add-build-attributes", cl::init(false)); +static cl::opt +DisableExperimentalExtension("riscv-disable-experimental-ext",

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/2] [RISCV] Teach .option arch to support experimental extensions.