brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · d383a2c Raw
58 lines · c
1// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s2// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-gnu -target-feature +avx -emit-llvm -o - %s | FileCheck %s3// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-gnu -target-feature +avx512f -emit-llvm -o - %s | FileCheck %s4// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-mingw -emit-llvm -o - %s | FileCheck %s5// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-mingw -target-feature +avx -emit-llvm -o - %s | FileCheck %s6// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-mingw -target-feature +avx512f -emit-llvm -o - %s | FileCheck %s7 8#include <immintrin.h>9 10// CHECK-LABEL: define dso_local void @testm12811// CHECK-LABEL: %argp.cur = load ptr, ptr %args, align 412// CHECK-NEXT: %0 = getelementptr inbounds i8, ptr %argp.cur, i32 1513// CHECK-NEXT: %argp.cur.aligned = call ptr @llvm.ptrmask.p0.i32(ptr %0, i32 -16)14void testm128(int argCount, ...) {15  __m128 res;16  __builtin_va_list args;17  __builtin_va_start(args, argCount);18  res = __builtin_va_arg(args, __m128);19  __builtin_va_end(args);20}21 22// CHECK-LABEL: define dso_local void @testm25623// CHECK-LABEL: %argp.cur = load ptr, ptr %args, align 424// CHECK-NEXT: %0 = getelementptr inbounds i8, ptr %argp.cur, i32 3125// CHECK-NEXT: %argp.cur.aligned = call ptr @llvm.ptrmask.p0.i32(ptr %0, i32 -32)26void testm256(int argCount, ...) {27  __m256 res;28  __builtin_va_list args;29  __builtin_va_start(args, argCount);30  res = __builtin_va_arg(args, __m256);31  __builtin_va_end(args);32}33 34// CHECK-LABEL: define dso_local void @testm51235// CHECK-LABEL: %argp.cur = load ptr, ptr %args, align 436// CHECK-NEXT: %0 = getelementptr inbounds i8, ptr %argp.cur, i32 6337// CHECK-NEXT: %argp.cur.aligned = call ptr @llvm.ptrmask.p0.i32(ptr %0, i32 -64)38void testm512(int argCount, ...) {39  __m512 res;40  __builtin_va_list args;41  __builtin_va_start(args, argCount);42  res = __builtin_va_arg(args, __m512);43  __builtin_va_end(args);44}45 46// CHECK-LABEL: define dso_local void @testPastArguments47// CHECK: call void (i32, ...) @testm128(i32 noundef 1, <4 x float> noundef %0)48// CHECK: call void (i32, ...) @testm256(i32 noundef 1, <8 x float> noundef %1)49// CHECK: call void (i32, ...) @testm512(i32 noundef 1, <16 x float> noundef %2)50void testPastArguments(void) {51  __m128 a;52  __m256 b;53  __m512 c;54  testm128(1, a);55  testm256(1, b);56  testm512(1, c);57}58