<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 - Clang crashes while building Linux kernel due to [llvm] r351626 - Reapply "[CGP] Check for existing inttotpr before creating new one""
   href="https://bugs.llvm.org/show_bug.cgi?id=40393">40393</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang crashes while building Linux kernel due to [llvm] r351626 - Reapply "[CGP] Check for existing inttotpr before creating new one"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>maxim.kuvyrkov@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

Linaro's TCWG LLVM+Kernel tracking bisected kernel build regression down to
this commit.

Successfully identified regression in CI configuration
llvm-master-aarch64-lts-defconfig for llvm between bad_rev
be88539b85204041f727ec6499315884b3d886b0 and baseline_rev
4a22fb18c7935c6c1bae1af0b2e4a4c9e256ee04 .

Culprit:
<cut>
commit 85a0467a11bc748a242a858dfb950fce2956fa79
Author: Roman Tereshin <<a href="mailto:rtereshin@apple.com">rtereshin@apple.com</a>>
Date:   Fri Jan 18 20:13:42 2019 +0000

   [CGP] Check for existing inttotpr before creating new one

   Make sure CodeGenPrepare doesn't emit multiple inttoptr instructions of
   the same integer value while sinking address computations, but rather
   CSEs them on the fly: excessive inttoptr's confuse SCEV into thinking
   that related pointers have nothing to do with each other.

   This problem blocks LoadStoreVectorizer from vectorizing some of the
   loads / stores in a downstream target.

   Reviewed By: hfinkel

   Differential Revision: <a href="https://reviews.llvm.org/D56838">https://reviews.llvm.org/D56838</a>

   llvm-svn: 351582
</cut>

Results regressed from (for last_good ==
d4023bd2cb2606db1a734966b14f865a52c68285)

<cut>
reset_artifacts:
-10
build_llvm:
-1
linux_n_obj:
all
</cut>

to (for first_bad == 85a0467a11bc748a242a858dfb950fce2956fa79)

<cut>
reset_artifacts:
-10
build_llvm:
-1
linux_n_obj:
5131
</cut>

Artifacts of last_good build:
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/build-d4023bd2cb2606db1a734966b14f865a52c68285/">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/build-d4023bd2cb2606db1a734966b14f865a52c68285/</a>
Artifacts of first_bad build:
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/build-85a0467a11bc748a242a858dfb950fce2956fa79/">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/build-85a0467a11bc748a242a858dfb950fce2956fa79/</a>

Reproduce builds:
<cut>
mkdir investigate-llvm-85a0467a11bc748a242a858dfb950fce2956fa79
cd investigate-llvm-85a0467a11bc748a242a858dfb950fce2956fa79
git clone <a href="https://git.linaro.org/toolchain/jenkins-scripts">https://git.linaro.org/toolchain/jenkins-scripts</a>
wget
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/manifests/build-baseline.sh">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/manifests/build-baseline.sh</a>
./jenkins-scripts/tcwg_kernel-build.sh @@ build-baseline.sh
wget
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/test.sh">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/test.sh</a>
chmod +x test.sh
cd llvm
# Reproduce first_bad build
git checkout --detach 85a0467a11bc748a242a858dfb950fce2956fa79
../test.sh
# Reproduce last_good build
git checkout --detach d4023bd2cb2606db1a734966b14f865a52c68285
../test.sh
cd ..
</cut>

History of pending regressions and results:
<a href="https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/ci/tcwg_kernel/llvm-master-aarch64-lts-defconfig">https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/ci/tcwg_kernel/llvm-master-aarch64-lts-defconfig</a>

Bisect log:
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/bisect.log/*view*/">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/bisect.log/*view*/</a>
Artifacts:
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/artifact/artifacts/</a>
Build URL:
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/</a>
Build log:
<a href="https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/consoleText">https://ci.linaro.org/job/tcwg_kernel-bisect-llvm-master-aarch64-lts-defconfig/4/consoleText</a></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>