Date: Thu, 18 Jan 2018 21:46:10 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328146 - head/contrib/llvm/lib/Target/X86 Message-ID: <201801182146.w0ILkAsa015006@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Thu Jan 18 21:46:09 2018 New Revision: 328146 URL: https://svnweb.freebsd.org/changeset/base/328146 Log: Pull in r322106 from upstream llvm trunk (by Alexey Bataev): [COST]Fix PR35865: Fix cost model evaluation for shuffle on X86. Summary: If the vector type is transformed to non-vector single type, the compile may crash trying to get vector information about non-vector type. Reviewers: RKSimon, spatel, mkuper, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41862 This should fix "Not a vector MVT!" errors when building the games/dhewm3 port. Reported by: jbeich PR: 225271 Modified: head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp Modified: head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp Thu Jan 18 21:44:07 2018 (r328145) +++ head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp Thu Jan 18 21:46:09 2018 (r328146) @@ -754,7 +754,8 @@ int X86TTIImpl::getShuffleCost(TTI::ShuffleKind Kind, // type remains the same. if (Kind == TTI::SK_PermuteSingleSrc && LT.first != 1) { MVT LegalVT = LT.second; - if (LegalVT.getVectorElementType().getSizeInBits() == + if (LegalVT.isVector() && + LegalVT.getVectorElementType().getSizeInBits() == Tp->getVectorElementType()->getPrimitiveSizeInBits() && LegalVT.getVectorNumElements() < Tp->getVectorNumElements()) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801182146.w0ILkAsa015006>