<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 - SystemZ data layout shouldn't depend on target features"
   href="https://bugs.llvm.org/show_bug.cgi?id=50386">50386</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SystemZ data layout shouldn't depend on target features
          </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>Backend: SystemZ
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>aaronpuchert@alice-dsl.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The SystemZ backend uses different target layouts depending on target features,
specifically it adds v128:64 if vector extensions are used. This means that
modules with different target features are not ABI-compatible, and would for
example prevent a library using different features than an application. This is
unprecedented and unexpected.

The commit message in ce4c10958502 states that

    However, for compatibility with old code that may use vector types, when
    *not* using the vector facility, the old alignment rules (vector types
    are naturally aligned) remain in use.

but I don't think that having the data layout feature-dependent helps
compatibility either.

This issue surfaces e.g. in Postgres, where static modules are compiled with
the default feature set, but the runtime JIT uses the feature set of the host.
Subsequently JITted code and the static modules are incompatible.

In my view the "Vector ABI" should be made the default, or whether it is being
used should be made part of the target triple. In any event, the data layout
should not depend on the feature set and modules compiled with different
features should be compatible. (And run on hardware that supports all of the
features.)</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>