[PATCH] D94234: [AArch64] Fix crash caused by invalid vector element type
Nicholas Guy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 07:43:49 PST 2021
NickGuy created this revision.
NickGuy added reviewers: SjoerdMeijer, dmgreen, dmajor.
NickGuy added a project: LLVM.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
NickGuy requested review of this revision.
Fixes a crash caused by D91255 <https://reviews.llvm.org/D91255>, when LLVMTy is null when calling changeExtendedVectorElementType.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94234
Files:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -11829,6 +11829,11 @@
(PreExtendType == MVT::Other))
return SDValue();
+ // Restrict valid pre-extend data type
+ if (PreExtendType != MVT::i8 && PreExtendType != MVT::i16 &&
+ PreExtendType != MVT::i32)
+ return SDValue();
+
EVT PreExtendVT = TargetType.changeVectorElementType(PreExtendType);
if (PreExtendVT.getVectorElementCount() != TargetType.getVectorElementCount())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94234.315139.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210107/1c5b9429/attachment.bin>
More information about the llvm-commits
mailing list