[llvm] [DXIL] Add DXIL SubArch to correspond to version number (PR #89125)
Damyan Pepper via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 12:57:19 PDT 2024
================
@@ -971,6 +971,60 @@ TEST(TripleTest, ParsedIDs) {
EXPECT_EQ(Triple::Amplification, T.getEnvironment());
EXPECT_FALSE(T.supportsCOMDAT());
+ T = Triple("dxilv1.0-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v10, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.1-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v11, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.2-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v12, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.3-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v13, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.4-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v14, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.5-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v15, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.6-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v16, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.7-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v17, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
+ T = Triple("dxilv1.8-unknown-unknown");
+ EXPECT_EQ(Triple::dxil, T.getArch());
+ EXPECT_EQ(Triple::DXILSubArch_v18, T.getSubArch());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::UnknownOS, T.getOS());
+
----------------
damyanp wrote:
Would test cases for:
* dxilv1.9-unkown-unknown
* dxil-unknown-unknown
Be interesting?
https://github.com/llvm/llvm-project/pull/89125
More information about the llvm-commits
mailing list