[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

H.J Lu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 31 13:27:41 PDT 2018


hjl.tools added a comment.

In https://reviews.llvm.org/D53919#1282811, @efriedma wrote:

> No, AVX512 wasn't even announced when clang 3.3 came out.


Try this with clang 3.3 and clang 7.0.

[hjl at gnu-cfl-1 tmp]$ cat z.c
typedef int __attribute__((mode(SI))) si;
typedef si __attribute__((vector_size (64))) v;

v
foo (void)
{
 v y = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' };
 return y;
}
[hjl at gnu-cfl-1 tmp]$ gcc -S -O2 z.c
z.c: In function ‘foo’:
z.c:6:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
 {
 ^
[hjl at gnu-cfl-1 tmp]$


Repository:
  rC Clang

https://reviews.llvm.org/D53919





More information about the cfe-commits mailing list