@@ -32,87 +32,87 @@ int main(void) {
32
32
// CHECK: [[ALLOC:%.+]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @{{.+}}, i32 [[GTID]], i32 65, i64 48, i64 0, i32 (i32, i8*)* bitcast (i32 (i32, [[PRIVATES_TY:%.+]]*)* [[TASK_ENTRY:@.+]] to i32 (i32, i8*)*))
33
33
// CHECK: [[EVT_VAL:%.+]] = call i8* @__kmpc_task_allow_completion_event(%struct.ident_t* @{{.+}}, i32 [[GTID]], i8* [[ALLOC]])
34
34
// CHECK: [[CAST_EVT_VAL:%.+]] = ptrtoint i8* [[EVT_VAL]] to i64
35
- // CHECK: store i64 [[CAST_EVT_VAL]], i64* [[EVT_ADDR]],
35
+ // CHECK: store i64 [[CAST_EVT_VAL]], i64* [[EVT_ADDR]], align 8
36
36
// CHECK: [[DATA:%.+]] = bitcast i8* [[ALLOC]] to [[PRIVATES_TY]]*
37
- // CHECK: [[D:%.+]] = load i8*, i8** [[D_ADDR]],
37
+ // CHECK: [[D:%.+]] = load i8*, i8** [[D_ADDR]], align 8
38
38
// CHECK: [[D_DEP:%.+]] = bitcast i8* [[D]] to %struct.kmp_depend_info*
39
39
// CHECK: [[D_DEP_BASE:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[D_DEP]], i{{.+}} -1
40
40
// CHECK: [[D_DEP_BASE_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[D_DEP_BASE]], i{{.+}} 0, i{{.+}} 0
41
- // CHECK: [[SIZE1:%.+]] = load i64, i64* [[D_DEP_BASE_SIZE]],
42
- // CHECK-DAG: store i64 0, i64* [[DEPOBJ_SIZE_ADDR]],
43
- // CHECK: [[SZ:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR]],
41
+ // CHECK: [[SIZE1:%.+]] = load i64, i64* [[D_DEP_BASE_SIZE]], align 8
42
+ // CHECK-DAG: store i64 0, i64* [[DEPOBJ_SIZE_ADDR]], align 8
43
+ // CHECK: [[SZ:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR]], align 8
44
44
// CHECK: [[SIZE:%.+]] = add nuw i64 [[SZ]], [[SIZE1]]
45
- // CHECK: store i64 [[SIZE]], i64* [[DEPOBJ_SIZE_ADDR]],
46
- // CHECK: [[X:%.+]] = load i8*, i8** [[X_ADDR]],
45
+ // CHECK: store i64 [[SIZE]], i64* [[DEPOBJ_SIZE_ADDR]], align 8
46
+ // CHECK: [[X:%.+]] = load i8*, i8** [[X_ADDR]], align 8
47
47
// CHECK: [[X_DEP:%.+]] = bitcast i8* [[X]] to %struct.kmp_depend_info*
48
48
// CHECK: [[X_DEP_BASE:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[X_DEP]], i{{.+}} -1
49
49
// CHECK: [[X_DEP_BASE_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[X_DEP_BASE]], i{{.+}} 0, i{{.+}} 0
50
- // CHECK: [[SIZE2:%.+]] = load i64, i64* [[X_DEP_BASE_SIZE]],
51
- // CHECK-DAG: store i64 0, i64* [[DEPOBJ_SIZE_ADDR1]],
52
- // CHECK: [[SZ:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR1]],
50
+ // CHECK: [[SIZE2:%.+]] = load i64, i64* [[X_DEP_BASE_SIZE]], align 8
51
+ // CHECK-DAG: store i64 0, i64* [[DEPOBJ_SIZE_ADDR1]], align 8
52
+ // CHECK: [[SZ:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR1]], align 8
53
53
// CHECK: [[SIZE3:%.+]] = add nuw i64 [[SZ]], [[SIZE2]]
54
- // CHECK: store i64 [[SIZE3]], i64* [[DEPOBJ_SIZE_ADDR1]],
55
- // CHECK: [[SZ:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR]],
56
- // CHECK: [[SZ1:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR1]],
54
+ // CHECK: store i64 [[SIZE3]], i64* [[DEPOBJ_SIZE_ADDR1]], align 8
55
+ // CHECK: [[SZ:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR]], align 8
56
+ // CHECK: [[SZ1:%.+]] = load i64, i64* [[DEPOBJ_SIZE_ADDR1]], align 8
57
57
// CHECK: [[SIZE1:%.+]] = add nuw i64 0, [[SZ]]
58
58
// CHECK: [[SIZE2:%.+]] = add nuw i64 [[SIZE1]], [[SZ1]]
59
59
// CHECK: [[SIZE:%.+]] = add nuw i64 [[SIZE2]], 2
60
60
// CHECK: [[SV:%.+]] = call i8* @llvm.stacksave()
61
- // CHECK: store i8* [[SV]], i8** [[SV_ADDR:%.+]],
61
+ // CHECK: store i8* [[SV]], i8** [[SV_ADDR:%.+]], align 8
62
62
// CHECK: [[VLA:%.+]] = alloca %struct.kmp_depend_info, i64 [[SIZE]],
63
63
// CHECK: [[SIZE32:%.+]] = trunc i64 [[SIZE]] to i32
64
64
// CHECK: [[VLA0:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA]], i64 0
65
65
// CHECK: [[BASE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA0]], i{{.+}} 0, i{{.+}} 0
66
66
// CHECK: [[A_ADDR_CAST:%.+]] = ptrtoint i32* [[A_ADDR]] to i64
67
- // CHECK: store i64 [[A_ADDR_CAST]], i64* [[BASE_ADDR]],
67
+ // CHECK: store i64 [[A_ADDR_CAST]], i64* [[BASE_ADDR]], align 16
68
68
// CHECK: [[SIZE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA0]], i{{.+}} 0, i{{.+}} 1
69
- // CHECK: store i64 4, i64* [[SIZE_ADDR]],
69
+ // CHECK: store i64 4, i64* [[SIZE_ADDR]], align 8
70
70
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA0]], i{{.+}} 0, i{{.+}} 2
71
- // CHECK: store i8 1, i8* [[FLAGS_ADDR]],
72
- // CHECK: [[A:%.+]] = load i32, i32* [[A_ADDR]],
71
+ // CHECK: store i8 1, i8* [[FLAGS_ADDR]], align 1
72
+ // CHECK: [[A:%.+]] = load i32, i32* [[A_ADDR]], align 4
73
73
// CHECK: [[A_CAST:%.+]] = sext i32 [[A]] to i64
74
74
// CHECK: [[SZ1:%.+]] = mul nuw i64 24, [[A_CAST]]
75
- // CHECK: [[A:%.+]] = load i32, i32* [[A_ADDR]],
75
+ // CHECK: [[A:%.+]] = load i32, i32* [[A_ADDR]], align 4
76
76
// CHECK: [[A_CAST:%.+]] = sext i32 [[A]] to i64
77
77
// CHECK: [[SZ:%.+]] = mul nuw i64 [[SZ1]], [[A_CAST]]
78
78
// CHECK: [[VLA1:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA]], i64 1
79
79
// CHECK: [[BASE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA1]], i{{.+}} 0, i{{.+}} 0
80
80
// CHECK: [[B_ADDR_CAST:%.+]] = ptrtoint i32** %{{.+}} to i64
81
- // CHECK: store i64 [[B_ADDR_CAST]], i64* [[BASE_ADDR]],
81
+ // CHECK: store i64 [[B_ADDR_CAST]], i64* [[BASE_ADDR]], align 8
82
82
// CHECK: [[SIZE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA1]], i{{.+}} 0, i{{.+}} 1
83
- // CHECK: store i64 [[SZ]], i64* [[SIZE_ADDR]],
83
+ // CHECK: store i64 [[SZ]], i64* [[SIZE_ADDR]], align 8
84
84
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA1]], i{{.+}} 0, i{{.+}} 2
85
- // CHECK: store i8 1, i8* [[FLAGS_ADDR]],
86
- // CHECK: store i64 2, i64* [[DEP_COUNTER_ADDR]],
87
- // CHECK: [[D:%.+]] = load i8*, i8** [[D_ADDR]],
85
+ // CHECK: store i8 1, i8* [[FLAGS_ADDR]], align 8
86
+ // CHECK: store i64 2, i64* [[DEP_COUNTER_ADDR]], align 8
87
+ // CHECK: [[D:%.+]] = load i8*, i8** [[D_ADDR]], align 8
88
88
// CHECK: [[BC:%.+]] = bitcast i8* [[D]] to %struct.kmp_depend_info*
89
89
// CHECK: [[PREV:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[BC]], i64 -1
90
90
// CHECK: [[SIZE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[PREV]], i{{.+}} 0, i{{.+}} 0
91
- // CHECK: [[SIZE:%.+]] = load i64, i64* [[SIZE_ADDR]],
91
+ // CHECK: [[SIZE:%.+]] = load i64, i64* [[SIZE_ADDR]], align 8
92
92
// CHECK: [[BYTES:%.+]] = mul nuw i64 24, [[SIZE]]
93
- // CHECK: [[POS:%.+]] = load i64, i64* [[DEP_COUNTER_ADDR]],
93
+ // CHECK: [[POS:%.+]] = load i64, i64* [[DEP_COUNTER_ADDR]], align 8
94
94
// CHECK: [[VLA_D:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA]], i64 [[POS]]
95
95
// CHECK: [[DEST:%.+]] = bitcast %struct.kmp_depend_info* [[VLA_D]] to i8*
96
96
// CHECK: [[SRC:%.+]] = bitcast %struct.kmp_depend_info* [[BC]] to i8*
97
97
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align {{.+}} [[DEST]], i8* align {{.+}} [[SRC]], i64 [[BYTES]], i1 false)
98
98
// CHECK: [[ADD:%.+]] = add nuw i64 [[POS]], [[SIZE]]
99
- // CHECK: store i64 [[ADD]], i64* [[DEP_COUNTER_ADDR]],
100
- // CHECK: [[X:%.+]] = load i8*, i8** [[X_ADDR]],
99
+ // CHECK: store i64 [[ADD]], i64* [[DEP_COUNTER_ADDR]], align 8
100
+ // CHECK: [[X:%.+]] = load i8*, i8** [[X_ADDR]], align 8
101
101
// CHECK: [[BC:%.+]] = bitcast i8* [[X]] to %struct.kmp_depend_info*
102
102
// CHECK: [[PREV:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[BC]], i64 -1
103
103
// CHECK: [[SIZE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[PREV]], i{{.+}} 0, i{{.+}} 0
104
- // CHECK: [[SIZE:%.+]] = load i64, i64* [[SIZE_ADDR]],
104
+ // CHECK: [[SIZE:%.+]] = load i64, i64* [[SIZE_ADDR]], align 8
105
105
// CHECK: [[BYTES:%.+]] = mul nuw i64 24, [[SIZE]]
106
- // CHECK: [[POS:%.+]] = load i64, i64* [[DEP_COUNTER_ADDR]],
106
+ // CHECK: [[POS:%.+]] = load i64, i64* [[DEP_COUNTER_ADDR]], align 8
107
107
// CHECK: [[VLA_X:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA]], i64 [[POS]]
108
108
// CHECK: [[DEST:%.+]] = bitcast %struct.kmp_depend_info* [[VLA_X]] to i8*
109
109
// CHECK: [[SRC:%.+]] = bitcast %struct.kmp_depend_info* [[BC]] to i8*
110
110
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align {{.+}} [[DEST]], i8* align {{.+}} [[SRC]], i64 [[BYTES]], i1 false)
111
111
// CHECK: [[ADD:%.+]] = add nuw i64 [[POS]], [[SIZE]]
112
- // CHECK: store i64 [[ADD]], i64* [[DEP_COUNTER_ADDR]],
112
+ // CHECK: store i64 [[ADD]], i64* [[DEP_COUNTER_ADDR]], align 8
113
113
// CHECK: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[VLA]] to i8*
114
114
// CHECK: call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 [[GTID]], i8* [[ALLOC]], i32 [[SIZE32]], i8* [[BC]], i32 0, i8* null)
115
- // CHECK: [[SV:%.+]] = load i8*, i8** [[SV_ADDR]],
115
+ // CHECK: [[SV:%.+]] = load i8*, i8** [[SV_ADDR]], align 8
116
116
// CHECK: call void @llvm.stackrestore(i8* [[SV]])
117
117
#pragma omp task depend(in: a, ([3][a][a])&b) depend(depobj: d, x) detach(evt)
118
118
{
0 commit comments