This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Let alloca return 16 bytes alignment
ClosedPublic

Authored by Xiangling_L on Oct 21 2020, 1:45 PM.

Details

Summary

On AIX, to support vector types, which should always be 16bytes aligned, we set alloca to return 16 bytes aligned memory space.

Diff Detail

Event Timeline

Xiangling_L created this revision.Oct 21 2020, 1:45 PM
Xiangling_L requested review of this revision.Oct 21 2020, 1:45 PM
clang/test/CodeGen/aix_alloca_align.c
3

Minor nit: Use double-hyphen for long option and = instead of space between the option and the argument.

6

Same comment.

8

Minor comment: Use __SIZE_TYPE__.

Xiangling_L marked 3 inline comments as done.

Fixed the testcase formatting issues;
Fixed the BIGGEST_ALIGNMENT value in testcases;

clang/test/CodeGen/aix_alloca_align.c
12

I'm not entirely sure, but can we try for size 32 and see if we get 16?

Xiangling_L marked an inline comment as done.Oct 22 2020, 10:43 AM
Xiangling_L added inline comments.
clang/test/CodeGen/aix_alloca_align.c
12

Sure, I will add this in.

Xiangling_L marked an inline comment as done.

Add one case to the test;

This revision is now accepted and ready to land.Oct 22 2020, 3:14 PM
This revision was automatically updated to reflect the committed changes.