[SystemZ] Improve handling of vector alignments.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 4 Aug 2022 10:16:44 +0000 (12:16 +0200)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 8 Sep 2022 15:33:05 +0000 (17:33 +0200)
commitde0e3117d40af95993b11d0622f9700415552d48
treee143191a136b2107fd5e137714c5f2841bf35aa0
parente09c75049854fee251e99c4c3c55f3f391f52a10
[SystemZ] Improve handling of vector alignments.

Make the DataLayout string always hold a vector alignment of 8 bytes,
regardless of the vector ABI. This makes the datalayout depend only on the
target triple which is the general expectation (in assertions).

On older architectures where vectors use the natural alignment (16 bytes),
the front end will maintain the same behavior and produce an overalignment
compared to the datalayout.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D131158
clang/lib/Basic/Targets/SystemZ.h
clang/test/CodeGen/SystemZ/align-systemz-02.c [new file with mode: 0644]
clang/test/CodeGen/target-data.c
llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
llvm/test/CodeGen/SystemZ/function-attributes-01.ll
llvm/test/CodeGen/SystemZ/vec-abi-align.ll