150
|
1 // REQUIRES: powerpc-registered-target
|
|
2 // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
|
|
3
|
|
4 void test1(long int *r, int code, long int *a, long int *b) {
|
207
|
5 // CHECK-LABEL: define{{.*}} void @test1
|
150
|
6
|
|
7 r[0] = __builtin_tbegin (0);
|
|
8 // CHECK: @llvm.ppc.tbegin
|
|
9 r[1] = __builtin_tbegin (1);
|
|
10 // CHECK: @llvm.ppc.tbegin
|
|
11 r[2] = __builtin_tend (0);
|
|
12 // CHECK: @llvm.ppc.tend
|
|
13 r[3] = __builtin_tendall ();
|
|
14 // CHECK: @llvm.ppc.tendall
|
|
15
|
|
16 r[4] = __builtin_tabort (code);
|
|
17 // CHECK: @llvm.ppc.tabort
|
|
18 r[5] = __builtin_tabort (0x1);
|
|
19 // CHECK: @llvm.ppc.tabort
|
|
20 r[6] = __builtin_tabortdc (0xf, a[0], b[0]);
|
|
21 // CHECK: @llvm.ppc.tabortdc
|
|
22 r[7] = __builtin_tabortdci (0xf, a[1], 0x1);
|
|
23 // CHECK: @llvm.ppc.tabortdc
|
|
24 r[8] = __builtin_tabortwc (0xf, a[2], b[2]);
|
|
25 // CHECK: @llvm.ppc.tabortwc
|
|
26 r[9] = __builtin_tabortwci (0xf, a[3], 0x1);
|
|
27 // CHECK: @llvm.ppc.tabortwc
|
|
28
|
|
29 r[10] = __builtin_tcheck ();
|
|
30 // CHECK: @llvm.ppc.tcheck
|
|
31 r[11] = __builtin_trechkpt ();
|
|
32 // CHECK: @llvm.ppc.trechkpt
|
|
33 r[12] = __builtin_treclaim (0);
|
|
34 // CHECK: @llvm.ppc.treclaim
|
|
35 r[13] = __builtin_tresume ();
|
|
36 // CHECK: @llvm.ppc.tresume
|
|
37 r[14] = __builtin_tsuspend ();
|
|
38 // CHECK: @llvm.ppc.tsuspend
|
|
39 r[15] = __builtin_tsr (0);
|
|
40 // CHECK: @llvm.ppc.tsr
|
|
41
|
|
42 r[16] = __builtin_ttest ();
|
|
43 // CHECK: @llvm.ppc.ttest
|
|
44
|
|
45 r[17] = __builtin_get_texasr ();
|
|
46 // CHECK: @llvm.ppc.get.texasr
|
|
47 r[18] = __builtin_get_texasru ();
|
|
48 // CHECK: @llvm.ppc.get.texasru
|
|
49 r[19] = __builtin_get_tfhar ();
|
|
50 // CHECK: @llvm.ppc.get.tfhar
|
|
51 r[20] = __builtin_get_tfiar ();
|
|
52 // CHECK: @llvm.ppc.get.tfiar
|
|
53
|
|
54 __builtin_set_texasr (a[21]);
|
|
55 // CHECK: @llvm.ppc.set.texasr
|
|
56 __builtin_set_texasru (a[22]);
|
|
57 // CHECK: @llvm.ppc.set.texasru
|
|
58 __builtin_set_tfhar (a[23]);
|
|
59 // CHECK: @llvm.ppc.set.tfhar
|
|
60 __builtin_set_tfiar (a[24]);
|
|
61 // CHECK: @llvm.ppc.set.tfiar
|
|
62 }
|