[llvm-branch-commits] [llvm] eeb713b - [Hexagon] Fold single-use variables into assert. NFCI.
Benjamin Kramer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 10 01:58:49 PST 2020
Author: Benjamin Kramer
Date: 2020-12-10T10:53:56+01:00
New Revision: eeb713bbe24207343c8666a3240265758cd4fabd
URL: https://github.com/llvm/llvm-project/commit/eeb713bbe24207343c8666a3240265758cd4fabd
DIFF: https://github.com/llvm/llvm-project/commit/eeb713bbe24207343c8666a3240265758cd4fabd.diff
LOG: [Hexagon] Fold single-use variables into assert. NFCI.
Silences unused variable warnings in Release builds.
Added:
Modified:
llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
index 1bfb4cef3eb6..8af1f6d15ad1 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -1088,8 +1088,7 @@ auto HexagonVectorCombine::vresize(IRBuilder<> &Builder, Value *Val,
int NewSize, Value *Pad) const -> Value * {
assert(isa<VectorType>(Val->getType()));
auto *ValTy = cast<VectorType>(Val->getType());
- auto *PadTy = Pad->getType();
- assert(ValTy->getElementType() == PadTy);
+ assert(ValTy->getElementType() == Pad->getType());
int CurSize = ValTy->getElementCount().getFixedValue();
if (CurSize == NewSize)
@@ -1173,7 +1172,6 @@ auto HexagonVectorCombine::createHvxIntrinsic(IRBuilder<> &Builder,
int HwLen = HST.getVectorLength();
Type *BoolTy = Type::getInt1Ty(F.getContext());
Type *Int32Ty = Type::getInt32Ty(F.getContext());
- Type *Int64Ty = Type::getInt64Ty(F.getContext());
// HVX vector -> v16i32/v32i32
// HVX vector predicate -> v512i1/v1024i1
auto getTypeForIntrin = [&](Type *Ty) -> Type * {
@@ -1186,7 +1184,7 @@ auto HexagonVectorCombine::createHvxIntrinsic(IRBuilder<> &Builder,
return VectorType::get(Int32Ty, HwLen / 4, /*Scalable*/ false);
}
// Non-HVX type. It should be a scalar.
- assert(Ty == Int32Ty || Ty == Int64Ty);
+ assert(Ty == Int32Ty || Ty->isIntegerTy(64));
return Ty;
};
More information about the llvm-branch-commits
mailing list