Bug 264480 - devel/llvm13, devel/llvm14: Apply llvm fix for possible hangs with CPUTYPE=skylake-avx512 and tigerlake
Summary: devel/llvm13, devel/llvm14: Apply llvm fix for possible hangs with CPUTYPE=sk...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Brooks Davis
URL: https://bugs.freebsd.org/bugzilla/sho...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-05 15:25 UTC by Vladimir Druzenko
Modified: 2022-07-05 12:35 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)
vvd: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-05 15:25:00 UTC
AFAIU:
* 13 and 14 are affected.
* 10 and older are not affected.
* Don't know about 11, 12 and -devel.

Patch was commited to src already:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264394#c4
https://cgit.freebsd.org/src/commit/?id=592e876a422960a78938caa714f2263ff38eb87b
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-05 15:55:16 UTC
Just tested build of x11-toolkits/qt5-gui with patched devel/llvm13:
CPP=clang-cpp13
CC=clang13
CXX=clang++13
Build without hungs.
Comment 2 Brooks Davis freebsd_committer freebsd_triage 2022-06-06 16:01:58 UTC
The commit in question is in 14.0.4 which is in the tree. I can look at syncing llvm14 in quarterly if that would be useful.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-06 17:26:48 UTC
(In reply to Brooks Davis from comment #2)
LLVM 13 is affected too. I tested patch.
And this patch commited to stable/12 - it still have LLVM 13.
https://cgit.freebsd.org/src/log/contrib/llvm-project?h=stable/12

Don't know about LLVM 11 and 12.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-06-06 18:52:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7aba7c32a06718082a54fee86fbb98d056a6a094

commit 7aba7c32a06718082a54fee86fbb98d056a6a094
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-06-06 18:51:37 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-06-06 18:51:37 +0000

    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

 devel/llvm13/Makefile                                     |  2 +-
 .../patch-llvm_lib_Target_X86_X86ISelLowering.cpp (new)   | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-07 07:20:47 UTC
Checked devel/llvm14 - 14.0.4 already have this patch.
devel/llvm11 and devel/llvm12 have same code in lib/Target/X86/X86ISelLowering.cpp - probably need patch too, but better if somebody test it.
devel/llvm10 - no this code.
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-06-13 16:40:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5509f8e7f242d4de27d457834995386b07f11410

commit 5509f8e7f242d4de27d457834995386b07f11410
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-06-13 16:40:26 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-06-13 16:40:26 +0000

    devel/llvm12: 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

 devel/llvm12/Makefile                                     |  2 +-
 .../patch-llvm_lib_Target_X86_X86ISelLowering.cpp (new)   | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
Comment 7 Brooks Davis freebsd_committer freebsd_triage 2022-07-04 08:18:06 UTC
I'd kept this open for an MFH to 2022Q2. 2022Q3 is out and has these fixes.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2022-07-04 09:35:48 UTC
(In reply to Brooks Davis from comment #7)
AFAIU, devel/llvm11 need this patch too.
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-07-05 12:35:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8c5c5a01e50d37cbcc50c0499fee610f55570c99

commit 8c5c5a01e50d37cbcc50c0499fee610f55570c99
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-07-05 12:32:58 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-07-05 12:32:58 +0000

    devel/llvm11: 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:            2022Q3
    Sponsored by:   DARPA, AFRL

 devel/llvm11/Makefile                                     | 10 +++++-----
 .../files/patch-lib_Target_X86_X86ISelLowering.cpp (new)  | 15 +++++++++++++++
 2 files changed, 20 insertions(+), 5 deletions(-)