https://bugs.llvm.org/show_bug.cgi?id=46523
Bug ID: 46523
Summary: rG42f488b63a04 breaks arm64 kernel build with ThinLTO
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: spatel+l...@rotateright.com
Reporter: samitolva...@google.com
CC: llvm-bugs@lists.llvm.org, ndesaulni...@google.com
Created attachment 23658
--> https://bugs.llvm.org/attachment.cgi?id=23658&action=edit
kernel configuration
Commit 42f488b63a04fdaa931315bdadecb6d23e20529a ("[InstCombine] improve
matching for sext-lshr-trunc patterns") breaks the arm64 Linux kernel build
with ThinLTO.
Steps to reproduce:
$ git clone https://github.com/samitolvanen/linux.git
$ cd linux
$ git checkout origin/clang-lto
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 defconfig
$ ./scripts/config -e LTO_CLANG -e NFP -e BPF_SYSCALL
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 olddefconfig
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 -j110
...
LD .tmp_vmlinux.kallsyms1
ld.lld: error: undefined symbol: __compiletime_assert_900
>>> referenced by jit.c:653 (drivers/net/ethernet/netronome/nfp/bpf/jit.c:653)
>>> vmlinux.o:(jeq_imm.llvm.9259135780514890817
make: *** [Makefile:1161: vmlinux] Error 1
This is caused by compiletime_assert in the FIELD_FIT / __BF_FIELD_CHECK macro
in the function ur_load_imm_any, which is called in jeq_imm.
The code compiles fine without ThinLTO, or with the previous revision of LLVM
prior to this commit.
I have attached a .config that reproduces the error.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs