|
1 | 1 | // RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -emit-cir -o %t.cir -Wall -Werror |
2 | | -// RUN: FileCheck --check-prefixes=CIR-CHECK --input-file=%t.cir %s |
| 2 | +// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s |
3 | 3 | // RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror |
4 | | -// RUN: FileCheck --check-prefixes=CIR-CHECK --input-file=%t.cir %s |
| 4 | +// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s |
5 | 5 |
|
6 | 6 | // RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -emit-llvm -o %t.ll -Wall -Werror |
7 | | -// RUN: FileCheck --check-prefixes=LLVM-CHECK --input-file=%t.ll %s |
| 7 | +// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s |
8 | 8 | // RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror |
9 | | -// RUN: FileCheck --check-prefixes=LLVM-CHECK --input-file=%t.ll %s |
| 9 | +// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s |
| 10 | + |
| 11 | +// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG |
| 12 | +// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG |
10 | 13 |
|
11 | 14 | // This test mimics clang/test/CodeGen/X86/sse2-builtins.c, which eventually |
12 | 15 | // CIR shall be able to support fully. |
|
16 | 19 |
|
17 | 20 | void test_mm_clflush(void* A) { |
18 | 21 | // CIR-LABEL: test_mm_clflush |
19 | | - // LLVM-LABEL: teh |
| 22 | + // LLVM-LABEL: test_mm_clflush |
| 23 | + // OGCG-LABEL: test_mm_clflush |
20 | 24 | _mm_clflush(A); |
21 | | - // CIR-CHECK: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.clflush" {{%.*}} : (!cir.ptr<!void>) -> !void |
22 | | - // LLVM-CHECK: call void @llvm.x86.sse2.clflush(ptr {{%.*}}) |
| 25 | + // CIR: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.clflush" {{%.*}} : (!cir.ptr<!void>) -> !void |
| 26 | + // LLVM: call void @llvm.x86.sse2.clflush(ptr {{%.*}}) |
| 27 | + // OGCG: call void @llvm.x86.sse2.clflush(ptr {{%.*}}) |
23 | 28 | } |
24 | 29 |
|
25 | 30 | void test_mm_lfence(void) { |
26 | | - // CIR-CHECK-LABEL: test_mm_lfence |
27 | | - // LLVM-CHECK-LABEL: test_mm_lfence |
| 31 | + // CIR-LABEL: test_mm_lfence |
| 32 | + // LLVM-LABEL: test_mm_lfence |
| 33 | + // OGCG-LABEL: test_mm_lfence |
28 | 34 | _mm_lfence(); |
29 | | - // CIR-CHECK: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.lfence" : () -> !void |
30 | | - // LLVM-CHECK: call void @llvm.x86.sse2.lfence() |
| 35 | + // CIR: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.lfence" : () -> !void |
| 36 | + // LLVM: call void @llvm.x86.sse2.lfence() |
| 37 | + // OGCG: call void @llvm.x86.sse2.lfence() |
31 | 38 | } |
32 | 39 |
|
33 | 40 | void test_mm_mfence(void) { |
34 | | - // CIR-CHECK-LABEL: test_mm_mfence |
35 | | - // LLVM-CHECK-LABEL: test_mm_mfence |
| 41 | + // CIR-LABEL: test_mm_mfence |
| 42 | + // LLVM-LABEL: test_mm_mfence |
| 43 | + // OGCG-LABEL: test_mm_mfence |
36 | 44 | _mm_mfence(); |
37 | | - // CIR-CHECK: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.mfence" : () -> !void |
38 | | - // LLVM-CHECK: call void @llvm.x86.sse2.mfence() |
| 45 | + // CIR: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.mfence" : () -> !void |
| 46 | + // LLVM: call void @llvm.x86.sse2.mfence() |
| 47 | + // OGCG: call void @llvm.x86.sse2.mfence() |
39 | 48 | } |
40 | 49 |
|
41 | 50 | void test_mm_pause(void) { |
42 | 51 | // CIR-LABEL: test_mm_pause |
43 | 52 | // LLVM-LABEL: test_mm_pause |
| 53 | + // OGCG-LABEL: test_mm_pause |
44 | 54 | _mm_pause(); |
45 | 55 | // CIR: {{%.*}} = cir.call_llvm_intrinsic "x86.sse2.pause" : () -> !void |
46 | 56 | // LLVM: call void @llvm.x86.sse2.pause() |
| 57 | + // OGCG: call void @llvm.x86.sse2.pause() |
47 | 58 | } |
0 commit comments