[llvm] [GlobalISel] Introduce LLT:token() as a special scalar type (PR #85189)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 00:00:15 PDT 2024
================
@@ -18,6 +18,28 @@ using namespace llvm;
namespace {
+TEST(LowLevelTypeTest, Token) {
+ LLVMContext C;
+ DataLayout DL("");
+
+ const LLT TTy = LLT::token();
+
+ // Test kind.
+ ASSERT_TRUE(TTy.isValid());
+ ASSERT_TRUE(TTy.isScalar());
+ ASSERT_TRUE(TTy.isToken());
+
+ ASSERT_FALSE(TTy.isPointer());
+ ASSERT_FALSE(TTy.isVector());
+
+ const LLT STy = LLT::scalar(0);
+ ASSERT_TRUE(STy == TTy);
+
+ // Test equality operators.
+ EXPECT_TRUE(TTy == TTy);
+ EXPECT_FALSE(TTy != TTy);
----------------
arsenm wrote:
EXPECT_EQ/EXPECT_NE
https://github.com/llvm/llvm-project/pull/85189
More information about the llvm-commits
mailing list