[PATCH] D105157: Fixed unit test typo in declarations.
Hussain Kadhem via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 29 15:09:28 PDT 2021
hussainjk created this revision.
Herald added subscribers: dexonsmith, hiraditya.
hussainjk requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105157
Files:
llvm/lib/IR/IntrinsicInst.cpp
llvm/unittests/IR/VPIntrinsicTest.cpp
Index: llvm/unittests/IR/VPIntrinsicTest.cpp
===================================================================
--- llvm/unittests/IR/VPIntrinsicTest.cpp
+++ llvm/unittests/IR/VPIntrinsicTest.cpp
@@ -46,10 +46,10 @@
Str << " declare <8 x float> @llvm.vp." << BinaryFPOpcode
<< ".v8f32(<8 x float>, <8 x float>, <8 x i1>, i32) ";
- Str << " declare void @llvm.vp.store.v8i32.p0v8i32(<8 x i32>, <8 x i32>*, <8 x i1>, i32) "
- << " declare void @llvm.vp.scatter.v8i32.v8p0i32(<8 x i32>, <8 x i32*>, <8 x i1>, i32) "
- << " declare <8 x i32> @llvm.vp.load.v8i32.p0v8i32(<8 x i32>*, <8 x i1>, i32) "
- << " declare <8 x i32> @llvm.vp.gather.v8i32.v8p0i32(<8 x i32*>, <8 x i1>, i32) ";
+ Str << " declare void @llvm.vp.store.v8i32.p0v8i32(<8 x i32>, <8 x i32>*, <8 x i1>, i32) ";
+ Str << " declare void @llvm.vp.scatter.v8i32.v8p0i32(<8 x i32>, <8 x i32*>, <8 x i1>, i32) ";
+ Str << " declare <8 x i32> @llvm.vp.load.v8i32.p0v8i32(<8 x i32>*, <8 x i1>, i32) ";
+ Str << " declare <8 x i32> @llvm.vp.gather.v8i32.v8p0i32(<8 x i32*>, <8 x i1>, i32) ";
return parseAssemblyString(Str.str(), Err, C);
}
@@ -245,8 +245,8 @@
// Declare intrinsic anew with explicit types.
std::vector<Value *> Values;
- for (auto *ParamTy : FuncTy->params())
- Values.push_back(UndefValue::get(ParamTy));
+ for (auto *ParamTy : FuncTy->params()) {
+ Values.push_back(UndefValue::get(ParamTy));}
ASSERT_NE(F.getIntrinsicID(), Intrinsic::not_intrinsic);
auto *NewDecl = VPIntrinsic::getDeclarationForParams(
Index: llvm/lib/IR/IntrinsicInst.cpp
===================================================================
--- llvm/lib/IR/IntrinsicInst.cpp
+++ llvm/lib/IR/IntrinsicInst.cpp
@@ -477,30 +477,27 @@
VPFunc = Intrinsic::getDeclaration(M, VPID, Params[0]->getType());
break;
case Intrinsic::vp_load:
- VPFunc = Intrinsic::getDeclaration(M, VPID, {
- Params[0]->getType()->getPointerElementType(),
- Params[0]->getType()
- });
+ VPFunc = Intrinsic::getDeclaration(
+ M, VPID,
+ {Params[0]->getType()->getPointerElementType(), Params[0]->getType()});
break;
case Intrinsic::vp_gather:
- VPFunc = Intrinsic::getDeclaration(M, VPID, {
- VectorType::get(
- cast<VectorType>(Params[0]->getType())->getElementType()->getPointerElementType(),
- cast<VectorType>(Params[0]->getType())),
- Params[0]->getType()
- });
+ VPFunc = Intrinsic::getDeclaration(
+ M, VPID,
+ {VectorType::get(cast<VectorType>(Params[0]->getType())
+ ->getElementType()
+ ->getPointerElementType(),
+ cast<VectorType>(Params[0]->getType())),
+ Params[0]->getType()});
break;
case Intrinsic::vp_store:
- VPFunc = Intrinsic::getDeclaration(M, VPID, {
- Params[1]->getType()->getPointerElementType(),
- Params[1]->getType()
- });
+ VPFunc = Intrinsic::getDeclaration(
+ M, VPID,
+ {Params[1]->getType()->getPointerElementType(), Params[1]->getType()});
break;
case Intrinsic::vp_scatter:
- VPFunc = Intrinsic::getDeclaration(M, VPID, {
- Params[0]->getType(),
- Params[1]->getType()
- });
+ VPFunc = Intrinsic::getDeclaration(
+ M, VPID, {Params[0]->getType(), Params[1]->getType()});
break;
}
assert(VPFunc && "Could not declare VP intrinsic");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105157.355378.patch
Type: text/x-patch
Size: 3475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210629/f46e6fc9/attachment.bin>
More information about the llvm-commits
mailing list