[llvm] [AMDGPU] Sort features by name, add feature-name parsing (PR #220102)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 07:54:55 PDT 2026


================
@@ -2856,6 +2856,58 @@ TEST(TargetParserTest, testAMDGPUgetFeatureBitset) {
   EXPECT_TRUE(Empty.empty());
 }
 
+TEST(TargetParserTest, testAMDGPUParseFeature) {
+  // parseFeature is the inverse of getFeatureNames, so every bit must round
+  // trip. This also covers the sorted-index table the lookup binary searches:
+  // the enum is in declaration order, which is not name order.
----------------
MrSidims wrote:

Should we remove 

>  This also covers the sorted-index table the lookup binary searches:
>   the enum is in declaration order

 from the comment?

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


More information about the llvm-commits mailing list