1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00

devel/llvm13: fix hangs with CPUTYPE=skylake-avx512

Merge commit e8305c0b8f49 from llvm git (by Simon Pilgrim)

    [X86] combineX86ShuffleChain - don't fold to truncate(concat(V1,V2)) if it was already a PACK op

    Fixes #55050

PR:		264480
MFH:		2022Q2
Sponsored by:	DARPA, AFRL
This commit is contained in:
Brooks Davis 2022-06-06 19:51:37 +01:00
parent c5f56989b4
commit 7aba7c32a0
2 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= llvm
DISTVERSION= 13.0.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= devel lang
MASTER_SITES= https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \
https://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR}

View File

@ -0,0 +1,15 @@
--- llvm/lib/Target/X86/X86ISelLowering.cpp.orig
+++ llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -36201,7 +36201,11 @@
(RootVT.is128BitVector() && Subtarget.hasVLX())) &&
(MaskEltSizeInBits > 8 || Subtarget.hasBWI()) &&
isSequentialOrUndefInRange(Mask, 0, NumMaskElts, 0, 2)) {
- if (Depth == 0 && Root.getOpcode() == ISD::TRUNCATE)
+ // Bail if this was already a truncation or PACK node.
+ // We sometimes fail to match PACK if we demand known undef elements.
+ if (Depth == 0 && (Root.getOpcode() == ISD::TRUNCATE ||
+ Root.getOpcode() == X86ISD::PACKSS ||
+ Root.getOpcode() == X86ISD::PACKUS))
return SDValue(); // Nothing to do!
ShuffleSrcVT = MVT::getIntegerVT(MaskEltSizeInBits * 2);
ShuffleSrcVT = MVT::getVectorVT(ShuffleSrcVT, NumMaskElts / 2);