1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=msan < %s | FileCheck %s
4 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"
5 target triple = "x86_64-unknown-linux-gnu"
7 ; Function Attrs: sanitize_memory
8 define i1 @not_isfinite_or_zero_f16(half %x) sanitize_memory {
9 ; CHECK-LABEL: @not_isfinite_or_zero_f16(
10 ; CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr @__msan_param_tls, align 8
11 ; CHECK-NEXT: call void @llvm.donothing()
12 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i16 [[TMP1]], 0
13 ; CHECK-NEXT: [[CLASS:%.*]] = call i1 @llvm.is.fpclass.f16(half [[X:%.*]], i32 615)
14 ; CHECK-NEXT: store i1 [[TMP2]], ptr @__msan_retval_tls, align 8
15 ; CHECK-NEXT: ret i1 [[CLASS]]
17 %class = call i1 @llvm.is.fpclass.f16(half %x, i32 615)
21 ; Function Attrs: sanitize_memory
22 define <2 x i1> @not_isfinite_or_zero_v2f16_pos0_neg0_vec(<2 x half> %x) sanitize_memory {
23 ; CHECK-LABEL: @not_isfinite_or_zero_v2f16_pos0_neg0_vec(
24 ; CHECK-NEXT: [[TMP1:%.*]] = load <2 x i16>, ptr @__msan_param_tls, align 8
25 ; CHECK-NEXT: call void @llvm.donothing()
26 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne <2 x i16> [[TMP1]], zeroinitializer
27 ; CHECK-NEXT: [[CLASS:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f16(<2 x half> [[X:%.*]], i32 615)
28 ; CHECK-NEXT: store <2 x i1> [[TMP2]], ptr @__msan_retval_tls, align 8
29 ; CHECK-NEXT: ret <2 x i1> [[CLASS]]
31 %class = call <2 x i1> @llvm.is.fpclass.v2f16(<2 x half> %x, i32 615)
35 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
36 declare i1 @llvm.is.fpclass.f16(half, i32 immarg) #1
38 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
39 declare <2 x i1> @llvm.is.fpclass.v2f16(<2 x half>, i32 immarg) #1