[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

Tomas Matheson via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 06:24:24 PDT 2025


================
@@ -1831,6 +1831,22 @@ TEST_P(AArch64ExtensionDependenciesBaseCPUTestFixture,
   }
 }
 
+TEST(TargetParserTest, testAArch64ReconstructFromParsedFeatures) {
+  AArch64::ExtensionSet Extensions;
+  std::vector<std::string> FeatureOptions = {
+      "-sve2", "-Baz", "+sve", "+FooBar", "+sve2", "+neon", "-sve",
----------------
tmatheson-arm wrote:

I think this has the same issue as described for the C test: the function is not designed to be able to handle both `+feat` and `-feat` in the same list, because the driver would never emit that.

https://github.com/llvm/llvm-project/pull/142236


More information about the llvm-commits mailing list