brintos

brintos / llvm-project-archived public Read only

0
0
Text · 914 B · 584aef2 Raw
15 lines · c
1// Test general-regs-only target attribute on x862 3// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s4// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s5 6// CHECK: define{{.*}} void @f() [[GPR_ATTRS:#[0-9]+]]7void __attribute__((target("general-regs-only"))) f(void) { }8// CHECK: define{{.*}} void @f_before() [[GPR_ATTRS:#[0-9]+]]9void __attribute__((target("avx2,general-regs-only"))) f_before(void) { }10// CHECK: define{{.*}} void @f_after() [[AVX2_ATTRS:#[0-9]+]]11void __attribute__((target("general-regs-only,avx2"))) f_after(void) { }12 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{{.*}}"15