1 ; RUN: opt < %s -dfsan -S | FileCheck %s
2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
3 target triple = "x86_64-unknown-linux-gnu"
5 define i8 @add(i8 %a, i8 %b) {
7 ; CHECK-DAG: %[[ALABEL:.*]] = load{{.*}}__dfsan_arg_tls, i64 0, i64 0
8 ; CHECK-DAG: %[[BLABEL:.*]] = load{{.*}}__dfsan_arg_tls, i64 0, i64 1
9 ; CHECK: %[[UNION:.*]] = call{{.*}}__dfsan_union(i16 zeroext %[[ALABEL]], i16 zeroext %[[BLABEL]])
10 ; CHECK: %[[ADDLABEL:.*]] = phi i16 [ %[[UNION]], {{.*}} ], [ %[[ALABEL]], {{.*}} ]
12 ; CHECK: store i16 %[[ADDLABEL]], i16* @__dfsan_retval_tls
18 define i8 @sub(i8 %a, i8 %b) {
20 ; CHECK: load{{.*}}__dfsan_arg_tls
21 ; CHECK: load{{.*}}__dfsan_arg_tls
22 ; CHECK: call{{.*}}__dfsan_union
24 ; CHECK: store{{.*}}__dfsan_retval_tls
30 define i8 @mul(i8 %a, i8 %b) {
32 ; CHECK: load{{.*}}__dfsan_arg_tls
33 ; CHECK: load{{.*}}__dfsan_arg_tls
34 ; CHECK: call{{.*}}__dfsan_union
36 ; CHECK: store{{.*}}__dfsan_retval_tls
42 define i8 @sdiv(i8 %a, i8 %b) {
44 ; CHECK: load{{.*}}__dfsan_arg_tls
45 ; CHECK: load{{.*}}__dfsan_arg_tls
46 ; CHECK: call{{.*}}__dfsan_union
48 ; CHECK: store{{.*}}__dfsan_retval_tls
54 define i8 @udiv(i8 %a, i8 %b) {
56 ; CHECK: load{{.*}}__dfsan_arg_tls
57 ; CHECK: load{{.*}}__dfsan_arg_tls
58 ; CHECK: call{{.*}}__dfsan_union
60 ; CHECK: store{{.*}}__dfsan_retval_tls
66 define double @fneg(double %a) {
68 ; CHECK: load{{.*}}__dfsan_arg_tls
70 ; CHECK: store{{.*}}__dfsan_retval_tls