2022-03-29 09:41:31 +08:00
|
|
|
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
|
2022-10-07 14:09:44 +02:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -ffreestanding -target-feature +avx512vl -triple=x86_64-pc-win32 | FileCheck %s --check-prefix=Win
|
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -ffreestanding -target-feature +avx512vl -triple=x86_64-pc-linux-gnu | FileCheck %s --check-prefix=Lin
|
2022-03-29 09:41:31 +08:00
|
|
|
|
|
|
|
#include <immintrin.h>
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
__m512d r1[4];
|
|
|
|
__m512 r2[4];
|
|
|
|
} __sVector;
|
|
|
|
__sVector A;
|
|
|
|
|
|
|
|
__sVector __regcall foo(int a) {
|
|
|
|
return A;
|
|
|
|
}
|
|
|
|
|
|
|
|
double __regcall bar(__sVector a) {
|
|
|
|
return a.r1[0][4];
|
|
|
|
}
|
|
|
|
|
|
|
|
// FIXME: Do we need to change for Windows?
|
2024-01-11 09:46:54 +01:00
|
|
|
// Win: define dso_local x86_regcallcc void @__regcall3__foo(ptr dead_on_unwind noalias writable sret(%struct.__sVector) align 64 %agg.result, i32 noundef %a) #0
|
2022-10-07 14:09:44 +02:00
|
|
|
// Win: define dso_local x86_regcallcc double @__regcall3__bar(ptr noundef %a) #0
|
2023-09-07 20:33:31 +08:00
|
|
|
// Win: attributes #0 = { noinline nounwind optnone "min-legal-vector-width"="0" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+avx,+avx2,+avx512f,+avx512vl,+crc32,+cx8,+evex512,+f16c,+fma,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" }
|
2022-03-29 09:41:31 +08:00
|
|
|
|
|
|
|
// Lin: define dso_local x86_regcallcc %struct.__sVector @__regcall3__foo(i32 noundef %a) #0
|
|
|
|
// Lin: define dso_local x86_regcallcc double @__regcall3__bar([4 x <8 x double>] %a.coerce0, [4 x <16 x float>] %a.coerce1) #0
|
2023-09-07 20:33:31 +08:00
|
|
|
// Lin: attributes #0 = { noinline nounwind optnone "min-legal-vector-width"="512" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+avx,+avx2,+avx512f,+avx512vl,+crc32,+cx8,+evex512,+f16c,+fma,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" }
|