[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / attr-target-general-regs-only-x86.c
blob584aef2c6150605e1cbefb3b401f58264fcf54a2
1 // Test general-regs-only target attribute on x86
3 // RUN: %clang_cc1 -triple i386-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
4 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
6 // CHECK: define{{.*}} void @f() [[GPR_ATTRS:#[0-9]+]]
7 void __attribute__((target("general-regs-only"))) f(void) { }
8 // CHECK: define{{.*}} void @f_before() [[GPR_ATTRS:#[0-9]+]]
9 void __attribute__((target("avx2,general-regs-only"))) f_before(void) { }
10 // CHECK: define{{.*}} void @f_after() [[AVX2_ATTRS:#[0-9]+]]
11 void __attribute__((target("general-regs-only,avx2"))) f_after(void) { }
13 // CHECK: attributes [[GPR_ATTRS]] = { {{.*}} "target-features"="{{.*}}-avx{{.*}}-avx2{{.*}}-avx512f{{.*}}-sse{{.*}}-sse2{{.*}}-ssse3{{.*}}-x87{{.*}}"
14 // CHECK: attributes [[AVX2_ATTRS]] = { {{.*}} "target-features"="{{.*}}+avx{{.*}}+avx2{{.*}}+sse{{.*}}+sse2{{.*}}+ssse3{{.*}}-avx512f{{.*}}-x87{{.*}}"