2525#include " llvm/Support/Debug.h"
2626#include " llvm/IR/Dominators.h"
2727#include " llvm/IR/Function.h"
28- // #include "llvm/InitializePasses.h"
2928#include " llvm/IR/IntrinsicInst.h"
3029#include " llvm/IR/IntrinsicsAMDGPU.h"
3130#include " llvm/IR/Module.h"
@@ -46,15 +45,6 @@ using namespace llvm;
4645
4746namespace llvm {
4847
49- static bool IsValidInt (const Type *Ty) {
50- return Ty->isIntegerTy (1 ) ||
51- Ty->isIntegerTy (8 ) ||
52- Ty->isIntegerTy (16 ) ||
53- Ty->isIntegerTy (32 ) ||
54- Ty->isIntegerTy (64 ) ||
55- Ty->isIntegerTy (128 );
56- }
57-
5848static bool isShader (CallingConv::ID CC) {
5949 switch (CC) {
6050 case CallingConv::AMDGPU_VS:
@@ -81,14 +71,6 @@ bool AMDGPUTargetVerify::run(Function &F) {
8171
8272 for (auto &I : BB) {
8373
84- // Ensure integral types are valid: i8, i16, i32, i64, i128
85- if (I.getType ()->isIntegerTy ())
86- Check (IsValidInt (I.getType ()), " Int type is invalid." , &I);
87- for (unsigned i = 0 ; i < I.getNumOperands (); ++i)
88- if (I.getOperand (i)->getType ()->isIntegerTy ())
89- Check (IsValidInt (I.getOperand (i)->getType ()),
90- " Int type is invalid." , I.getOperand (i));
91-
9274 if (auto *CI = dyn_cast<CallInst>(&I))
9375 {
9476 // Ensure no kernel to kernel calls.
0 commit comments