<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] 'align_value' attribute not added to variables in types (LLVM type can't express it?)"
   href="https://bugs.llvm.org/show_bug.cgi?id=44527">44527</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[clang] 'align_value' attribute not added to variables in types (LLVM type can't express it?)
          </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>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>lebedev.ri@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>typedef double * aligned_double_ptr __attribute__((align_value(64)));

struct S {
    aligned_double_ptr y;
};

void foo(S*s){
    s->y = 0;
}

As per <a href="https://godbolt.org/z/PtLP2e">https://godbolt.org/z/PtLP2e</a>
we get

%struct.S = type { double* }
define dso_local void @_Z3fooP1S(%struct.S* nocapture %0) local_unnamed_addr #0
{
  %2 = getelementptr inbounds %struct.S, %struct.S* %0, i64 0, i32 0
  store double* null, double** %2, align 8, !tbaa !2
  ret void
}


So the alignment info did not reach IR.</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>