svn commit: r328146 - head/contrib/llvm/lib/Target/X86
Dimitry Andric
dim at FreeBSD.org
Thu Jan 18 21:46:11 UTC 2018
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()) {
More information about the svn-src-all
mailing list