<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 - SPEC2017 526.blender_r conflicting values for EnableSplitLTOUnit with -fprofile-use and -flto at link"
   href="https://bugs.llvm.org/show_bug.cgi?id=43050">43050</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SPEC2017 526.blender_r conflicting values for EnableSplitLTOUnit with -fprofile-use and -flto at link
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </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>Common Code Generator Code
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>tejohnson@google.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>adandrea@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Summary:
---------
I'm receiving a linker error building SPEC2017 526.blender_r on a Ubuntu 18.04
POWER9 machine when using options -Ofast -m64 -mcu=power9 -fprofile-use -flto. 
Doesn't have an issue linking when using -flto=thin.  Please let me know if you
require more information to reproduce.

Actual error:
--------------
/usr/bin/ld: error: LLVM gold plugin: linking module flags
'EnableSplitLTOUnit': IDs have conflicting values in
'blender/source/blender/render/intern/raytrace/rayobject.o' and 'ld-temp.o'
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
specmake: *** [/home/adandrea/spec2017/v1.0/benchspec/Makefile.defaults:337:
blender_r] Error 1

Expected error:
----------------
None

Using git bisect it appears the cause is:
-------------------------------------------
604f802fd30d60226fca7d808b7e513e7f80c603 is the first bad commit
commit 604f802fd30d60226fca7d808b7e513e7f80c603
Author: Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>>
Date:   Fri Jul 19 23:02:58 2019 +0000

    [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1

    Summary:
    Regular LTO modules do not need LTO Unit splitting, only ThinLTO does
    (they must be consistently split into regular and Thin units for
    optimizations such as whole program devirtualization and lower type
    tests). In order to avoid spurious errors from LTO when combining with
    split ThinLTO modules, always set this flag for regular LTO modules.

    Reviewers: pcc

    Subscribers: mehdi_amini, Prazek, inglorion, steven_wu, dexonsmith,
cfe-commits

    Tags: #clang

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

    llvm-svn: 366623

Steps to reproduce:
--------------------
Peak options used in my SPEC config are:
fprate=peak:
COPTIMIZE = -Ofast -m64 -mcpu=power9 -fexperimental-new-pass-manager
CXXOPTIMIZE = -Ofast -m64 -mcpu=power9 -fexperimental-new-pass-manager
PASS1_CXXOPTIMIZE = -fprofile-generate
PASS2_CXXOPTIMIZE = -fprofile-use=default.profdata -flto
PASS1_COPTIMIZE = -fprofile-generate
PASS2_COPTIMIZE = -fprofile-use=default.profdata -flto
PASS1_LDFLAGS = -L/opt/at12.0/lib64 -Wl,-rpath=/opt/at12.0/lib64 -lhugetlbfs
-Wl,-dynamic-linker /opt/at12.0/lib64/ld64.so.2
PASS2_LDFLAGS = -L/opt/at12.0/lib64 -Wl,-rpath=/opt/at12.0/lib64 -lhugetlbfs
-Wl,-dynamic-linker /opt/at12.0/lib64/ld64.so.2
fdo_post1      =  %{BASE_DIR}/bin/llvm-profdata merge default*.profraw -output
default.profdata

runcpu command used is:
runcpu --configfile <config> -T peak 526 -a build</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>