New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selected processor does not support `bfc w0,#1,#5' #697
Comments
I can reproduce this on mainline with your configuration files. I am running |
Doing a quick Google search shows that maybe |
Looks like the reason we have never caught this is somehow KASAN prevents it and That This appears to be a regression between LLVM 7 and 8, as LLVM 7.1.0 compiles this translation unit with that configuration just fine but not LLVM 8.0.1.
|
To be clear, there might not be anything wrong with that commit (i.e., kernel code might be wrong) but it was working and now isn't thus the bisect. |
Sounds like a bug in instruction selection (why would instruction selection pick an instruction that isn't in the base ISA?). Not in @gwelymernans ' patch. But thanks for running the bisection; too bad it didn't converge on a smoking gun related to ISEL. |
Yes, that is what I figured but it is worth dumping everything on the table for everyone to examine! |
A bug?! In my patch?!?! That's obvious madness. |
Indeed, 8.2 introduced the BFC assembler instruction. Applies when sf == 1 && N == 1. My guess is that the bug may be in LLVM's AsmPrinter, rather than any ISel. Probably it should only print BFC (instead of the equivalent BFM assembler instruction) when explicitly targeting Armv8.2 or above. When targeting before-Armv8.0 it probably should just produce the BFM equivalent. I guess this bug may only trigger when using a specific assembler? http://llvm.org/viewvc/llvm-project?view=revision&revision=236245 might be a relevant commit. |
Apparently, Arnd filed an LLVM bug for this back in July: https://llvm.org/pr42576 He posted a workaround patch a couple of hours ago: https://lore.kernel.org/lkml/20191002120136.1777161-7-arnd@arndb.de/ |
Summary: Fixes pr/42576. Link: ClangBuiltLinux/linux#697 Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D68356 llvm-svn: 373655
Summary: Fixes pr/42576. Link: ClangBuiltLinux/linux#697 Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D68356 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373655 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: Fixes pr/42576. Link: ClangBuiltLinux/linux#697 Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D68356 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373655 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: Fixes pr/42576. Link: ClangBuiltLinux/linux#697 Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D68356 llvm-svn: 373655
------------------------------------------------------------------------ r373655 | nickdesaulniers | 2019-10-03 13:10:02 -0700 (Thu, 03 Oct 2019) | 16 lines [AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a Summary: Fixes pr/42576. Link: ClangBuiltLinux/linux#697 Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D68356 ------------------------------------------------------------------------
------------------------------------------------------------------------ r373655 | nickdesaulniers | 2019-10-03 13:10:02 -0700 (Thu, 03 Oct 2019) | 16 lines [AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a Summary: Fixes pr/42576. Link: ClangBuiltLinux/linux#697 Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D68356 ------------------------------------------------------------------------
Trying to compile kernel 5.3.1 with LLVM/clang-9.0.0 on aarch64
Full logs can be found here https://abf.openmandriva.org/build_lists/610527 also links to GitHub sources
CC [M] drivers/gpu/drm/amd/amdgpu/sdma_v4_0.o BUILDSTDERR: /tmp/sdma_v4_0-3f5dad.s: Assembler messages: BUILDSTDERR: /tmp/sdma_v4_0-3f5dad.s:11941: Error: selected processor does not support `bfc w0,#1,#5' BUILDSTDERR: clang-9: error: assembler command failed with exit code 1 (use -v to see invocation) BUILDSTDERR: make[4]: *** [scripts/Makefile.build:280: drivers/gpu/drm/amd/amdgpu/sdma_v4_0.o] Error 1 BUILDSTDERR: make[4]: *** Waiting for unfinished jobs.... CC [M] drivers/gpu/drm/amd/amdgpu/gfx_v10_0.o BUILDSTDERR: make[3]: *** [scripts/Makefile.build:497: drivers/gpu/drm/amd/amdgpu] Error 2 BUILDSTDERR: make[3]: *** Waiting for unfinished jobs....
The text was updated successfully, but these errors were encountered: