[llvm-bugs] [Bug 45297] New: Crash when building Linux kernel's AMDGPU driver for powerpc64le

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 24 11:57:21 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45297

            Bug ID: 45297
           Summary: Crash when building Linux kernel's AMDGPU driver for
                    powerpc64le
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: natechancellor at gmail.com
                CC: llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com

Building Fedora's powerpc64le config crashes in the AMDGPU driver.

$ curl -LSs
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-5.6-rc7.tar.gz
| tar xzf -

$ cd linux-5.6-rc7

$ curl -LSso .config
'https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/plain/fedora/configs/kernel-5.6.0-ppc64le.config?h=kernel-5.6.0-0.rc7.git0.2.fc32'

$ make -j$(nproc) -s ARCH=powerpc CC=clang CROSS_COMPILE=powerpc64le-linux-gnu-
olddefconfig drivers/gpu/drm/amd/amdgpu/
fatal error: error in backend: Cannot select: 0x89ef540: ch =
PPCISD::ST_VSR_SCAL_INT<(store 4 into %ir.1463)> 0x89dd638:1, 0x89eed88,
0x89e44b0, Constant:i64<4>, ValueType:ch:i32,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:39
  0x89eed88: f64 = PPCISD::FP_TO_SINT_IN_VSR 0x89f4a40,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:39
    0x89f4a40: f64 = fp_extend 0x89f1560,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:39
      0x89f1560: f32 = fdiv 0x89f8c88, 0x89dd2f8,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:69
        0x89f8c88: f32 = fmul 0x89ef268, 0x89f5128,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:59
          0x89ef268: f32,ch = CopyFromReg 0x8570c28, Register:f32 %114,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:59
            0x89f33e0: f32 = Register %114
          0x89f5128: f32,ch = load<(load 4 from constant-pool)> 0x8570c28,
0x89f0fb0, undef:i64
            0x89f0fb0: i64,ch = PPCISD::TOC_ENTRY<(load 8 from got)>
TargetConstantPool:i64<float 1.000000e+06> 0, Register:i64 $x2
              0x89f4b78: i64 = TargetConstantPool<float 1.000000e+06> 0
              0x89f2f00: i64 = Register $x2
            0x89d9ee8: i64 = undef
        0x89dd2f8: f32 = fmul 0x89dd638, 0x89f9168,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1127:38
          0x89dd638: f32,ch = load<(load 4 from %ir.1458)> 0x89e9ac8,
0x89f2bc0, undef:i64,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1127:43
            0x89f2bc0: i64 = add nuw 0x89ef748, Constant:i64<62104>,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1127:43
              0x89ef748: i64,ch = CopyFromReg 0x8570c28, Register:i64 %177,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1115:7
                0x89e2220: i64 = Register %177
              0x89dd910: i64 = Constant<62104>
            0x89d9ee8: i64 = undef
          0x89f9168: f32,ch = load<(load 4 from constant-pool)> 0x8570c28,
0x89f8cf0, undef:i64
            0x89f8cf0: i64,ch = PPCISD::TOC_ENTRY<(load 8 from got)>
TargetConstantPool:i64<float 1.600000e+01> 0, Register:i64 $x2
              0x89f1838: i64 = TargetConstantPool<float 1.600000e+01> 0
              0x89f2f00: i64 = Register $x2
            0x89d9ee8: i64 = undef
  0x89e44b0: i64 = add 0x89ef748, Constant:i64<7644>,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1126:30
    0x89ef748: i64,ch = CopyFromReg 0x8570c28, Register:i64 %177,
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1115:7
      0x89e2220: i64 = Register %177
    0x89f1288: i64 = Constant<7644>
  0x89f9648: i64 = Constant<4>
In function: dcn_validate_bandwidth
clang-11: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
ClangBuiltLinux clang version 11.0.0 (git://github.com/llvm/llvm-project
ae37e2285d233f28217e4e95a3ff71059c7ee8c7)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/nathan/cbl/toolchains/llvm-tot/bin
clang-11: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-11: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/dcn_calcs-42bba4.c
clang-11: note: diagnostic msg: /tmp/dcn_calcs-42bba4.sh
clang-11: note: diagnostic msg:

********************
make[5]: *** [scripts/Makefile.build:268:
drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o] Error 70
make[5]: *** Waiting for unfinished jobs....

creduce spits out with the linked interestingness test from the full
preprocessed source:

float a;
int b;
void c() { b = a; }

https://github.com/nathanchance/creduce-files/blob/05085a2632d31a4f44ab4434dbbe1f21e9d19ef4/fedora-ppc64le-amdgpu/test.sh

https://github.com/nathanchance/creduce-files/blob/05085a2632d31a4f44ab4434dbbe1f21e9d19ef4/fedora-ppc64le-amdgpu/dcn_calcs.i.orig

I can reproduce this back to LLVM 8.0.1 so does not seem like a recent
regression.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200324/baed3cf3/attachment.html>


More information about the llvm-bugs mailing list