diff options
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/Utils.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/Utils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/Utils.cpp b/llvm/lib/CodeGen/GlobalISel/Utils.cpp index 129e6963aef3..328a14658045 100644 --- a/llvm/lib/CodeGen/GlobalISel/Utils.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Utils.cpp @@ -1906,3 +1906,10 @@ bool llvm::isGuaranteedNotToBeUndef(Register Reg, return ::isGuaranteedNotToBeUndefOrPoison(Reg, MRI, Depth, UndefPoisonKind::UndefOnly); } + +Type *llvm::getTypeForLLT(LLT Ty, LLVMContext &C) { + if (Ty.isVector()) + return VectorType::get(IntegerType::get(C, Ty.getScalarSizeInBits()), + Ty.getElementCount()); + return IntegerType::get(C, Ty.getSizeInBits()); +} |
