llvm/llvm/unittests/CodeGen/LowLevelTypeTest.cpp

//===- llvm/unittest/CodeGen/GlobalISel/LowLevelTypeTest.cpp --------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/LowLevelTypeUtils.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/TypeSize.h"
#include "gtest/gtest.h"

usingnamespacellvm;

namespace {

TEST(LowLevelTypeTest, Token) {}

TEST(LowLevelTypeTest, Scalar) {}

TEST(LowLevelTypeTest, Vector) {}

TEST(LowLevelTypeTest, ScalarOrVector) {}

TEST(LowLevelTypeTest, ChangeElementType) {}

TEST(LowLevelTypeTest, ChangeNumElements) {}

#ifdef GTEST_HAS_DEATH_TEST
#ifndef NDEBUG

// Invalid to directly change the element size for pointers.
TEST(LowLevelTypeTest, ChangeElementTypeDeath) {
  const LLT P0 = LLT::pointer(0, 32);
  const LLT V2P0 = LLT::fixed_vector(2, P0);

  EXPECT_DEATH(P0.changeElementSize(64),
               "invalid to directly change element size for pointers");
  EXPECT_DEATH(V2P0.changeElementSize(64),
               "invalid to directly change element size for pointers");

  // Make sure this still fails even without a change in size.
  EXPECT_DEATH(P0.changeElementSize(32),
               "invalid to directly change element size for pointers");
  EXPECT_DEATH(V2P0.changeElementSize(32),
               "invalid to directly change element size for pointers");
}

#endif
#endif

TEST(LowLevelTypeTest, Pointer) {}

TEST(LowLevelTypeTest, Invalid) {}

TEST(LowLevelTypeTest, Divide) {}

TEST(LowLevelTypeTest, MultiplyElements) {}

constexpr LLT CELLT =;
constexpr LLT CES32 =;
constexpr LLT CEV2S32 =;
constexpr LLT CESV2S32 =;
constexpr LLT CEP0 =;
constexpr LLT CEV2P1 =;

static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;

TEST(LowLevelTypeTest, ConstExpr) {}

TEST(LowLevelTypeTest, IsFixedVector) {}

TEST(LowLevelTypeTest, IsScalableVector) {}
}