[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [llvm-bugs] [Bug 46523] New: rG42f488b63a04 breaks arm64 kernel build with ThinLTO
From:       via llvm-bugs <llvm-bugs () lists ! llvm ! org>
Date:       2020-06-30 18:44:34
Message-ID: bug-46523-206 () http ! bugs ! llvm ! org/
[Download RAW message or body]

--1593542675.23b8C0f0.7559
Date: Tue, 30 Jun 2020 11:44:35 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.llvm.org/
Auto-Submitted: auto-generated

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+llvm@rotateright.com
          Reporter: samitolvanen@google.com
                CC: llvm-bugs@lists.llvm.org, ndesaulniers@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.
--1593542675.23b8C0f0.7559
Date: Tue, 30 Jun 2020 11:44:35 -0700
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.llvm.org/
Auto-Submitted: auto-generated

<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - rG42f488b63a04 breaks arm64 kernel build with ThinLTO"
   href="https://bugs.llvm.org/show_bug.cgi?id=46523">46523</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>rG42f488b63a04 breaks arm64 kernel build with ThinLTO
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>spatel+llvm&#64;rotateright.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>samitolvanen&#64;google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs&#64;lists.llvm.org, ndesaulniers&#64;google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23658" \
name="attach_23658" title="kernel configuration">attachment 23658</a> <a \
href="attachment.cgi?id=23658&amp;action=edit" title="kernel \
configuration">[details]</a></span> kernel configuration

Commit 42f488b63a04fdaa931315bdadecb6d23e20529a (&quot;[InstCombine] improve
matching for sext-lshr-trunc patterns&quot;) breaks the arm64 Linux kernel build
with ThinLTO.

Steps to reproduce:

$ git clone <a href="https://github.com/samitolvanen/linux.git">https://github.com/samitolvanen/linux.git</a>
 $ 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
<span class="quote">&gt;&gt;&gt; referenced by jit.c:653 \
(drivers/net/ethernet/netronome/nfp/bpf/jit.c:653) &gt;&gt;&gt;               \
                vmlinux.o:(jeq_imm.llvm.9259135780514890817</span >
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>
--1593542675.23b8C0f0.7559--


[Attachment #3 (text/plain)]

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic