9405 lines · plain
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 62// REQUIRES: amdgpu-registered-target3// REQUIRES: spirv-registered-target4 5// Test without OCML_BASIC_ROUNDED_OPERATIONS6// RUN: %clang_cc1 -include __clang_hip_runtime_wrapper.h \7// RUN: -internal-isystem %S/../../lib/Headers/cuda_wrappers \8// RUN: -internal-isystem %S/Inputs/include \9// RUN: -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown \10// RUN: -target-cpu gfx906 -emit-llvm %s -fcuda-is-device -O1 -o - \11// RUN: -D__HIPCC_RTC__ | FileCheck -check-prefixes=CHECK,DEFAULT %s12 13// Check that we end up with fast math flags set on intrinsic calls14// RUN: %clang_cc1 -include __clang_hip_runtime_wrapper.h \15// RUN: -internal-isystem %S/../../lib/Headers/cuda_wrappers \16// RUN: -internal-isystem %S/Inputs/include \17// RUN: -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown \18// RUN: -target-cpu gfx906 -emit-llvm %s -fcuda-is-device -O1 -menable-no-infs \19// RUN: -menable-no-nans -o - \20// RUN: -D__HIPCC_RTC__ | FileCheck -check-prefixes=CHECK,FINITEONLY %s21 22// Check that we end up with -fapprox-func set on intrinsic calls23// RUN: %clang_cc1 -include __clang_hip_runtime_wrapper.h \24// RUN: -internal-isystem %S/../../lib/Headers/cuda_wrappers \25// RUN: -internal-isystem %S/Inputs/include \26// RUN: -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown \27// RUN: -target-cpu gfx906 -emit-llvm %s -fcuda-is-device -O1 -fgpu-approx-transcendentals -o - \28// RUN: -D__HIPCC_RTC__ | FileCheck -check-prefixes=CHECK,APPROX %s29 30// Check that we end up with fpmath metadata set on sqrt calls31// RUN: %clang_cc1 -include __clang_hip_runtime_wrapper.h \32// RUN: -internal-isystem %S/../../lib/Headers/cuda_wrappers \33// RUN: -internal-isystem %S/Inputs/include \34// RUN: -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown \35// RUN: -target-cpu gfx906 -emit-llvm %s -fcuda-is-device -O1 -fno-hip-fp32-correctly-rounded-divide-sqrt -o - \36// RUN: -D__HIPCC_RTC__ | FileCheck -check-prefixes=CHECK,NCRDIV %s37 38 39// Check that we use the AMDGCNSPIRV address space map40// RUN: %clang_cc1 -include __clang_hip_runtime_wrapper.h \41// RUN: -internal-isystem %S/../../lib/Headers/cuda_wrappers \42// RUN: -internal-isystem %S/Inputs/include \43// RUN: -triple spirv64-amd-amdhsa -aux-triple x86_64-unknown-unknown \44// RUN: -emit-llvm %s -fcuda-is-device -O1 -o - \45// RUN: -D__HIPCC_RTC__ | FileCheck -check-prefixes=AMDGCNSPIRV %s46 47#define BOOL_TYPE int48typedef unsigned long long uint64_t;49 50// CHECK-LABEL: define dso_local i64 @test___make_mantissa_base8(51// CHECK-SAME: ptr noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] {52// CHECK-NEXT: [[ENTRY:.*]]:53// CHECK-NEXT: [[TMP0:%.*]] = load i8, ptr [[P]], align 1, !tbaa [[CHAR_TBAA8:![0-9]+]]54// CHECK-NEXT: [[CMP_NOT_I1:%.*]] = icmp eq i8 [[TMP0]], 055// CHECK-NEXT: br i1 [[CMP_NOT_I1]], label %[[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT:.*]], label %[[WHILE_BODY_I:.*]]56// CHECK: [[WHILE_BODY_I]]:57// CHECK-NEXT: [[TMP1:%.*]] = phi i8 [ [[TMP3:%.*]], %[[IF_THEN_I:.*]] ], [ [[TMP0]], %[[ENTRY]] ]58// CHECK-NEXT: [[__R_0_I3:%.*]] = phi i64 [ [[SUB_I:%.*]], %[[IF_THEN_I]] ], [ 0, %[[ENTRY]] ]59// CHECK-NEXT: [[__TAGP_ADDR_0_I2:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[IF_THEN_I]] ], [ [[P]], %[[ENTRY]] ]60// CHECK-NEXT: [[TMP2:%.*]] = and i8 [[TMP1]], -861// CHECK-NEXT: [[OR_COND_I:%.*]] = icmp eq i8 [[TMP2]], 4862// CHECK-NEXT: br i1 [[OR_COND_I]], label %[[IF_THEN_I]], label %[[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT]]63// CHECK: [[IF_THEN_I]]:64// CHECK-NEXT: [[MUL_I:%.*]] = shl i64 [[__R_0_I3]], 365// CHECK-NEXT: [[CONV5_I:%.*]] = zext nneg i8 [[TMP1]] to i6466// CHECK-NEXT: [[ADD_I:%.*]] = add i64 [[MUL_I]], -4867// CHECK-NEXT: [[SUB_I]] = add i64 [[ADD_I]], [[CONV5_I]]68// CHECK-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I2]], i64 169// CHECK-NEXT: [[TMP3]] = load i8, ptr [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA8]]70// CHECK-NEXT: [[CMP_NOT_I:%.*]] = icmp eq i8 [[TMP3]], 071// CHECK-NEXT: br i1 [[CMP_NOT_I]], label %[[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP9:![0-9]+]]72// CHECK: [[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT]]:73// CHECK-NEXT: [[RETVAL_2_I:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ 0, %[[WHILE_BODY_I]] ], [ [[SUB_I]], %[[IF_THEN_I]] ]74// CHECK-NEXT: ret i64 [[RETVAL_2_I]]75//76// AMDGCNSPIRV-LABEL: define spir_func i64 @test___make_mantissa_base8(77// AMDGCNSPIRV-SAME: ptr addrspace(4) noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2:[0-9]+]] {78// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:79// AMDGCNSPIRV-NEXT: br label %[[WHILE_COND_I:.*]]80// AMDGCNSPIRV: [[WHILE_COND_I]]:81// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I:%.*]] = phi ptr addrspace(4) [ [[P]], %[[ENTRY]] ], [ [[__TAGP_ADDR_1_I:%.*]], %[[WHILE_BODY_I:.*]] ]82// AMDGCNSPIRV-NEXT: [[__R_0_I:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[__R_1_I:%.*]], %[[WHILE_BODY_I]] ]83// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I]], align 1, !tbaa [[CHAR_TBAA9:![0-9]+]]84// AMDGCNSPIRV-NEXT: [[CMP_NOT_I:%.*]] = icmp eq i8 [[TMP0]], 085// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I]], label %[[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT:.*]], label %[[WHILE_BODY_I]]86// AMDGCNSPIRV: [[WHILE_BODY_I]]:87// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = and i8 [[TMP0]], -888// AMDGCNSPIRV-NEXT: [[OR_COND_I:%.*]] = icmp eq i8 [[TMP1]], 4889// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = shl i64 [[__R_0_I]], 390// AMDGCNSPIRV-NEXT: [[CONV5_I:%.*]] = zext nneg i8 [[TMP0]] to i6491// AMDGCNSPIRV-NEXT: [[ADD_I:%.*]] = add i64 [[MUL_I]], -4892// AMDGCNSPIRV-NEXT: [[SUB_I:%.*]] = add i64 [[ADD_I]], [[CONV5_I]]93// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_IDX:%.*]] = zext i1 [[OR_COND_I]] to i6494// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I]], i64 [[__TAGP_ADDR_1_I_IDX]]95// AMDGCNSPIRV-NEXT: [[__R_1_I]] = select i1 [[OR_COND_I]], i64 [[SUB_I]], i64 [[__R_0_I]]96// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I]], label %[[WHILE_COND_I]], label %[[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT]], !llvm.loop [[LOOP10:![0-9]+]]97// AMDGCNSPIRV: [[_ZL21__MAKE_MANTISSA_BASE8PKC_EXIT]]:98// AMDGCNSPIRV-NEXT: [[RETVAL_2_I:%.*]] = phi i64 [ 0, %[[WHILE_BODY_I]] ], [ [[__R_0_I]], %[[WHILE_COND_I]] ]99// AMDGCNSPIRV-NEXT: ret i64 [[RETVAL_2_I]]100//101extern "C" __device__ uint64_t test___make_mantissa_base8(const char *p) {102 return __make_mantissa_base8(p);103}104 105// CHECK-LABEL: define dso_local i64 @test___make_mantissa_base10(106// CHECK-SAME: ptr noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR2]] {107// CHECK-NEXT: [[ENTRY:.*]]:108// CHECK-NEXT: [[TMP0:%.*]] = load i8, ptr [[P]], align 1, !tbaa [[CHAR_TBAA8]]109// CHECK-NEXT: [[CMP_NOT_I1:%.*]] = icmp eq i8 [[TMP0]], 0110// CHECK-NEXT: br i1 [[CMP_NOT_I1]], label %[[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT:.*]], label %[[WHILE_BODY_I:.*]]111// CHECK: [[WHILE_BODY_I]]:112// CHECK-NEXT: [[TMP1:%.*]] = phi i8 [ [[TMP3:%.*]], %[[IF_THEN_I:.*]] ], [ [[TMP0]], %[[ENTRY]] ]113// CHECK-NEXT: [[__R_0_I3:%.*]] = phi i64 [ [[SUB_I:%.*]], %[[IF_THEN_I]] ], [ 0, %[[ENTRY]] ]114// CHECK-NEXT: [[__TAGP_ADDR_0_I2:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[IF_THEN_I]] ], [ [[P]], %[[ENTRY]] ]115// CHECK-NEXT: [[TMP2:%.*]] = add i8 [[TMP1]], -48116// CHECK-NEXT: [[OR_COND_I:%.*]] = icmp ult i8 [[TMP2]], 10117// CHECK-NEXT: br i1 [[OR_COND_I]], label %[[IF_THEN_I]], label %[[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT]]118// CHECK: [[IF_THEN_I]]:119// CHECK-NEXT: [[MUL_I:%.*]] = mul i64 [[__R_0_I3]], 10120// CHECK-NEXT: [[CONV5_I:%.*]] = zext nneg i8 [[TMP1]] to i64121// CHECK-NEXT: [[ADD_I:%.*]] = add i64 [[MUL_I]], -48122// CHECK-NEXT: [[SUB_I]] = add i64 [[ADD_I]], [[CONV5_I]]123// CHECK-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I2]], i64 1124// CHECK-NEXT: [[TMP3]] = load i8, ptr [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA8]]125// CHECK-NEXT: [[CMP_NOT_I:%.*]] = icmp eq i8 [[TMP3]], 0126// CHECK-NEXT: br i1 [[CMP_NOT_I]], label %[[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP12:![0-9]+]]127// CHECK: [[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT]]:128// CHECK-NEXT: [[RETVAL_2_I:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ 0, %[[WHILE_BODY_I]] ], [ [[SUB_I]], %[[IF_THEN_I]] ]129// CHECK-NEXT: ret i64 [[RETVAL_2_I]]130//131// AMDGCNSPIRV-LABEL: define spir_func i64 @test___make_mantissa_base10(132// AMDGCNSPIRV-SAME: ptr addrspace(4) noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {133// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:134// AMDGCNSPIRV-NEXT: br label %[[WHILE_COND_I:.*]]135// AMDGCNSPIRV: [[WHILE_COND_I]]:136// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I:%.*]] = phi ptr addrspace(4) [ [[P]], %[[ENTRY]] ], [ [[__TAGP_ADDR_1_I:%.*]], %[[WHILE_BODY_I:.*]] ]137// AMDGCNSPIRV-NEXT: [[__R_0_I:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[__R_1_I:%.*]], %[[WHILE_BODY_I]] ]138// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I]], align 1, !tbaa [[CHAR_TBAA9]]139// AMDGCNSPIRV-NEXT: [[CMP_NOT_I:%.*]] = icmp eq i8 [[TMP0]], 0140// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I]], label %[[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT:.*]], label %[[WHILE_BODY_I]]141// AMDGCNSPIRV: [[WHILE_BODY_I]]:142// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = add i8 [[TMP0]], -48143// AMDGCNSPIRV-NEXT: [[OR_COND_I:%.*]] = icmp ult i8 [[TMP1]], 10144// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = mul i64 [[__R_0_I]], 10145// AMDGCNSPIRV-NEXT: [[CONV5_I:%.*]] = zext nneg i8 [[TMP0]] to i64146// AMDGCNSPIRV-NEXT: [[ADD_I:%.*]] = add i64 [[MUL_I]], -48147// AMDGCNSPIRV-NEXT: [[SUB_I:%.*]] = add i64 [[ADD_I]], [[CONV5_I]]148// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_IDX:%.*]] = zext i1 [[OR_COND_I]] to i64149// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I]], i64 [[__TAGP_ADDR_1_I_IDX]]150// AMDGCNSPIRV-NEXT: [[__R_1_I]] = select i1 [[OR_COND_I]], i64 [[SUB_I]], i64 [[__R_0_I]]151// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I]], label %[[WHILE_COND_I]], label %[[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT]], !llvm.loop [[LOOP13:![0-9]+]]152// AMDGCNSPIRV: [[_ZL22__MAKE_MANTISSA_BASE10PKC_EXIT]]:153// AMDGCNSPIRV-NEXT: [[RETVAL_2_I:%.*]] = phi i64 [ 0, %[[WHILE_BODY_I]] ], [ [[__R_0_I]], %[[WHILE_COND_I]] ]154// AMDGCNSPIRV-NEXT: ret i64 [[RETVAL_2_I]]155//156extern "C" __device__ uint64_t test___make_mantissa_base10(const char *p) {157 return __make_mantissa_base10(p);158}159 160// CHECK-LABEL: define dso_local i64 @test___make_mantissa_base16(161// CHECK-SAME: ptr noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR2]] {162// CHECK-NEXT: [[ENTRY:.*]]:163// CHECK-NEXT: [[TMP0:%.*]] = load i8, ptr [[P]], align 1, !tbaa [[CHAR_TBAA8]]164// CHECK-NEXT: [[CMP_NOT_I1:%.*]] = icmp eq i8 [[TMP0]], 0165// CHECK-NEXT: br i1 [[CMP_NOT_I1]], label %[[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT:.*]], label %[[WHILE_BODY_I:.*]]166// CHECK: [[WHILE_BODY_I]]:167// CHECK-NEXT: [[TMP1:%.*]] = phi i8 [ [[TMP5:%.*]], %[[IF_END31_I:.*]] ], [ [[TMP0]], %[[ENTRY]] ]168// CHECK-NEXT: [[__R_0_I3:%.*]] = phi i64 [ [[ADD28_I:%.*]], %[[IF_END31_I]] ], [ 0, %[[ENTRY]] ]169// CHECK-NEXT: [[__TAGP_ADDR_0_I2:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[IF_END31_I]] ], [ [[P]], %[[ENTRY]] ]170// CHECK-NEXT: [[TMP2:%.*]] = add i8 [[TMP1]], -48171// CHECK-NEXT: [[OR_COND_I:%.*]] = icmp ult i8 [[TMP2]], 10172// CHECK-NEXT: br i1 [[OR_COND_I]], label %[[IF_END31_I]], label %[[IF_ELSE_I:.*]]173// CHECK: [[IF_ELSE_I]]:174// CHECK-NEXT: [[TMP3:%.*]] = add i8 [[TMP1]], -97175// CHECK-NEXT: [[OR_COND33_I:%.*]] = icmp ult i8 [[TMP3]], 6176// CHECK-NEXT: br i1 [[OR_COND33_I]], label %[[IF_END31_I]], label %[[IF_ELSE17_I:.*]]177// CHECK: [[IF_ELSE17_I]]:178// CHECK-NEXT: [[TMP4:%.*]] = add i8 [[TMP1]], -65179// CHECK-NEXT: [[OR_COND34_I:%.*]] = icmp ult i8 [[TMP4]], 6180// CHECK-NEXT: br i1 [[OR_COND34_I]], label %[[IF_END31_I]], label %[[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT]]181// CHECK: [[IF_END31_I]]:182// CHECK-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I]] ], [ -87, %[[IF_ELSE_I]] ], [ -55, %[[IF_ELSE17_I]] ]183// CHECK-NEXT: [[MUL24_I:%.*]] = shl i64 [[__R_0_I3]], 4184// CHECK-NEXT: [[CONV25_I:%.*]] = zext nneg i8 [[TMP1]] to i64185// CHECK-NEXT: [[ADD26_I:%.*]] = add i64 [[MUL24_I]], [[DOTSINK]]186// CHECK-NEXT: [[ADD28_I]] = add i64 [[ADD26_I]], [[CONV25_I]]187// CHECK-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I2]], i64 1188// CHECK-NEXT: [[TMP5]] = load i8, ptr [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA8]]189// CHECK-NEXT: [[CMP_NOT_I:%.*]] = icmp eq i8 [[TMP5]], 0190// CHECK-NEXT: br i1 [[CMP_NOT_I]], label %[[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP13:![0-9]+]]191// CHECK: [[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT]]:192// CHECK-NEXT: [[RETVAL_2_I:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ 0, %[[IF_ELSE17_I]] ], [ [[ADD28_I]], %[[IF_END31_I]] ]193// CHECK-NEXT: ret i64 [[RETVAL_2_I]]194//195// AMDGCNSPIRV-LABEL: define spir_func i64 @test___make_mantissa_base16(196// AMDGCNSPIRV-SAME: ptr addrspace(4) noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {197// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:198// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i8, ptr addrspace(4) [[P]], align 1, !tbaa [[CHAR_TBAA9]]199// AMDGCNSPIRV-NEXT: [[CMP_NOT_I1:%.*]] = icmp eq i8 [[TMP0]], 0200// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I1]], label %[[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT:.*]], label %[[WHILE_BODY_I:.*]]201// AMDGCNSPIRV: [[WHILE_BODY_I]]:202// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = phi i8 [ [[TMP5:%.*]], %[[IF_END31_I:.*]] ], [ [[TMP0]], %[[ENTRY]] ]203// AMDGCNSPIRV-NEXT: [[__R_0_I3:%.*]] = phi i64 [ [[ADD28_I:%.*]], %[[IF_END31_I]] ], [ 0, %[[ENTRY]] ]204// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I2:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I:%.*]], %[[IF_END31_I]] ], [ [[P]], %[[ENTRY]] ]205// AMDGCNSPIRV-NEXT: [[TMP2:%.*]] = add i8 [[TMP1]], -48206// AMDGCNSPIRV-NEXT: [[OR_COND_I:%.*]] = icmp ult i8 [[TMP2]], 10207// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I]], label %[[IF_END31_I]], label %[[IF_ELSE_I:.*]]208// AMDGCNSPIRV: [[IF_ELSE_I]]:209// AMDGCNSPIRV-NEXT: [[TMP3:%.*]] = add i8 [[TMP1]], -97210// AMDGCNSPIRV-NEXT: [[OR_COND33_I:%.*]] = icmp ult i8 [[TMP3]], 6211// AMDGCNSPIRV-NEXT: br i1 [[OR_COND33_I]], label %[[IF_END31_I]], label %[[IF_ELSE17_I:.*]]212// AMDGCNSPIRV: [[IF_ELSE17_I]]:213// AMDGCNSPIRV-NEXT: [[TMP4:%.*]] = add i8 [[TMP1]], -65214// AMDGCNSPIRV-NEXT: [[OR_COND34_I:%.*]] = icmp ult i8 [[TMP4]], 6215// AMDGCNSPIRV-NEXT: br i1 [[OR_COND34_I]], label %[[IF_END31_I]], label %[[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT]]216// AMDGCNSPIRV: [[IF_END31_I]]:217// AMDGCNSPIRV-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I]] ], [ -87, %[[IF_ELSE_I]] ], [ -55, %[[IF_ELSE17_I]] ]218// AMDGCNSPIRV-NEXT: [[MUL24_I:%.*]] = shl i64 [[__R_0_I3]], 4219// AMDGCNSPIRV-NEXT: [[CONV25_I:%.*]] = zext nneg i8 [[TMP1]] to i64220// AMDGCNSPIRV-NEXT: [[ADD26_I:%.*]] = add i64 [[MUL24_I]], [[DOTSINK]]221// AMDGCNSPIRV-NEXT: [[ADD28_I]] = add i64 [[ADD26_I]], [[CONV25_I]]222// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I2]], i64 1223// AMDGCNSPIRV-NEXT: [[TMP5]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA9]]224// AMDGCNSPIRV-NEXT: [[CMP_NOT_I:%.*]] = icmp eq i8 [[TMP5]], 0225// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I]], label %[[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP14:![0-9]+]]226// AMDGCNSPIRV: [[_ZL22__MAKE_MANTISSA_BASE16PKC_EXIT]]:227// AMDGCNSPIRV-NEXT: [[RETVAL_2_I:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ 0, %[[IF_ELSE17_I]] ], [ [[ADD28_I]], %[[IF_END31_I]] ]228// AMDGCNSPIRV-NEXT: ret i64 [[RETVAL_2_I]]229//230extern "C" __device__ uint64_t test___make_mantissa_base16(const char *p) {231 return __make_mantissa_base16(p);232}233 234// CHECK-LABEL: define dso_local i64 @test___make_mantissa(235// CHECK-SAME: ptr noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR2]] {236// CHECK-NEXT: [[ENTRY:.*:]]237// CHECK-NEXT: [[TMP0:%.*]] = load i8, ptr [[P]], align 1, !tbaa [[CHAR_TBAA8]]238// CHECK-NEXT: [[CMP_I:%.*]] = icmp eq i8 [[TMP0]], 48239// CHECK-NEXT: br i1 [[CMP_I]], label %[[IF_THEN_I:.*]], label %[[WHILE_COND_I14_I_PREHEADER:.*]]240// CHECK: [[WHILE_COND_I14_I_PREHEADER]]:241// CHECK-NEXT: [[TMP1:%.*]] = load i8, ptr [[P]], align 1, !tbaa [[CHAR_TBAA8]]242// CHECK-NEXT: [[CMP_NOT_I17_I5:%.*]] = icmp eq i8 [[TMP1]], 0243// CHECK-NEXT: br i1 [[CMP_NOT_I17_I5]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I:.*]]244// CHECK: [[IF_THEN_I]]:245// CHECK-NEXT: [[INCDEC_PTR_I:%.*]] = getelementptr inbounds nuw i8, ptr [[P]], i64 1246// CHECK-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA8]]247// CHECK-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_PREHEADER:.*]] [248// CHECK-NEXT: i8 120, label %[[IF_THEN5_I:.*]]249// CHECK-NEXT: i8 88, label %[[IF_THEN5_I]]250// CHECK-NEXT: ]251// CHECK: [[WHILE_COND_I_I_PREHEADER]]:252// CHECK-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA8]]253// CHECK-NEXT: [[CMP_NOT_I_I14:%.*]] = icmp eq i8 [[TMP3]], 0254// CHECK-NEXT: br i1 [[CMP_NOT_I_I14]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I_I:.*]]255// CHECK: [[IF_THEN5_I]]:256// CHECK-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA8]]257// CHECK-NEXT: [[CMP_NOT_I30_I9:%.*]] = icmp eq i8 [[TMP4]], 0258// CHECK-NEXT: br i1 [[CMP_NOT_I30_I9]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I31_I:.*]]259// CHECK: [[WHILE_BODY_I31_I]]:260// CHECK-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I]] ]261// CHECK-NEXT: [[__R_0_I29_I11:%.*]] = phi i64 [ [[ADD28_I_I:%.*]], %[[IF_END31_I_I]] ], [ 0, %[[IF_THEN5_I]] ]262// CHECK-NEXT: [[__TAGP_ADDR_0_I28_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I:%.*]], %[[IF_END31_I_I]] ], [ [[INCDEC_PTR_I]], %[[IF_THEN5_I]] ]263// CHECK-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -48264// CHECK-NEXT: [[OR_COND_I32_I:%.*]] = icmp ult i8 [[TMP6]], 10265// CHECK-NEXT: br i1 [[OR_COND_I32_I]], label %[[IF_END31_I_I]], label %[[IF_ELSE_I_I:.*]]266// CHECK: [[IF_ELSE_I_I]]:267// CHECK-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -97268// CHECK-NEXT: [[OR_COND33_I_I:%.*]] = icmp ult i8 [[TMP7]], 6269// CHECK-NEXT: br i1 [[OR_COND33_I_I]], label %[[IF_END31_I_I]], label %[[IF_ELSE17_I_I:.*]]270// CHECK: [[IF_ELSE17_I_I]]:271// CHECK-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -65272// CHECK-NEXT: [[OR_COND34_I_I:%.*]] = icmp ult i8 [[TMP8]], 6273// CHECK-NEXT: br i1 [[OR_COND34_I_I]], label %[[IF_END31_I_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]]274// CHECK: [[IF_END31_I_I]]:275// CHECK-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I]] ], [ -87, %[[IF_ELSE_I_I]] ], [ -55, %[[IF_ELSE17_I_I]] ]276// CHECK-NEXT: [[MUL24_I_I:%.*]] = shl i64 [[__R_0_I29_I11]], 4277// CHECK-NEXT: [[CONV25_I_I:%.*]] = zext nneg i8 [[TMP5]] to i64278// CHECK-NEXT: [[ADD26_I_I:%.*]] = add i64 [[MUL24_I_I]], [[DOTSINK]]279// CHECK-NEXT: [[ADD28_I_I]] = add i64 [[ADD26_I_I]], [[CONV25_I_I]]280// CHECK-NEXT: [[INCDEC_PTR_I34_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I10]], i64 1281// CHECK-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I]], align 1, !tbaa [[CHAR_TBAA8]]282// CHECK-NEXT: [[CMP_NOT_I30_I:%.*]] = icmp eq i8 [[TMP9]], 0283// CHECK-NEXT: br i1 [[CMP_NOT_I30_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I31_I]], !llvm.loop [[LOOP13]]284// CHECK: [[WHILE_BODY_I_I]]:285// CHECK-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_PREHEADER]] ]286// CHECK-NEXT: [[__R_0_I_I16:%.*]] = phi i64 [ [[SUB_I_I:%.*]], %[[IF_THEN_I_I]] ], [ 0, %[[WHILE_COND_I_I_PREHEADER]] ]287// CHECK-NEXT: [[__TAGP_ADDR_0_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I:%.*]], %[[IF_THEN_I_I]] ], [ [[INCDEC_PTR_I]], %[[WHILE_COND_I_I_PREHEADER]] ]288// CHECK-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -8289// CHECK-NEXT: [[OR_COND_I_I:%.*]] = icmp eq i8 [[TMP11]], 48290// CHECK-NEXT: br i1 [[OR_COND_I_I]], label %[[IF_THEN_I_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]]291// CHECK: [[IF_THEN_I_I]]:292// CHECK-NEXT: [[MUL_I_I:%.*]] = shl i64 [[__R_0_I_I16]], 3293// CHECK-NEXT: [[CONV5_I_I:%.*]] = zext nneg i8 [[TMP10]] to i64294// CHECK-NEXT: [[ADD_I_I:%.*]] = add i64 [[MUL_I_I]], -48295// CHECK-NEXT: [[SUB_I_I]] = add i64 [[ADD_I_I]], [[CONV5_I_I]]296// CHECK-NEXT: [[INCDEC_PTR_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I15]], i64 1297// CHECK-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]298// CHECK-NEXT: [[CMP_NOT_I_I:%.*]] = icmp eq i8 [[TMP12]], 0299// CHECK-NEXT: br i1 [[CMP_NOT_I_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I_I]], !llvm.loop [[LOOP9]]300// CHECK: [[WHILE_BODY_I18_I]]:301// CHECK-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_PREHEADER]] ]302// CHECK-NEXT: [[__R_0_I16_I7:%.*]] = phi i64 [ [[SUB_I25_I:%.*]], %[[IF_THEN_I21_I]] ], [ 0, %[[WHILE_COND_I14_I_PREHEADER]] ]303// CHECK-NEXT: [[__TAGP_ADDR_0_I15_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I:%.*]], %[[IF_THEN_I21_I]] ], [ [[P]], %[[WHILE_COND_I14_I_PREHEADER]] ]304// CHECK-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -48305// CHECK-NEXT: [[OR_COND_I19_I:%.*]] = icmp ult i8 [[TMP14]], 10306// CHECK-NEXT: br i1 [[OR_COND_I19_I]], label %[[IF_THEN_I21_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]]307// CHECK: [[IF_THEN_I21_I]]:308// CHECK-NEXT: [[MUL_I22_I:%.*]] = mul i64 [[__R_0_I16_I7]], 10309// CHECK-NEXT: [[CONV5_I23_I:%.*]] = zext nneg i8 [[TMP13]] to i64310// CHECK-NEXT: [[ADD_I24_I:%.*]] = add i64 [[MUL_I22_I]], -48311// CHECK-NEXT: [[SUB_I25_I]] = add i64 [[ADD_I24_I]], [[CONV5_I23_I]]312// CHECK-NEXT: [[INCDEC_PTR_I26_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I6]], i64 1313// CHECK-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I]], align 1, !tbaa [[CHAR_TBAA8]]314// CHECK-NEXT: [[CMP_NOT_I17_I:%.*]] = icmp eq i8 [[TMP15]], 0315// CHECK-NEXT: br i1 [[CMP_NOT_I17_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I18_I]], !llvm.loop [[LOOP12]]316// CHECK: [[_ZL15__MAKE_MANTISSAPKC_EXIT]]:317// CHECK-NEXT: [[RETVAL_0_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I]] ], [ 0, %[[WHILE_COND_I14_I_PREHEADER]] ], [ [[SUB_I_I]], %[[IF_THEN_I_I]] ], [ 0, %[[WHILE_BODY_I_I]] ], [ [[ADD28_I_I]], %[[IF_END31_I_I]] ], [ 0, %[[IF_ELSE17_I_I]] ], [ [[SUB_I25_I]], %[[IF_THEN_I21_I]] ], [ 0, %[[WHILE_BODY_I18_I]] ]318// CHECK-NEXT: ret i64 [[RETVAL_0_I]]319//320// AMDGCNSPIRV-LABEL: define spir_func i64 @test___make_mantissa(321// AMDGCNSPIRV-SAME: ptr addrspace(4) noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {322// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:323// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i8, ptr addrspace(4) [[P]], align 1, !tbaa [[CHAR_TBAA9]]324// AMDGCNSPIRV-NEXT: [[CMP_I:%.*]] = icmp eq i8 [[TMP0]], 48325// AMDGCNSPIRV-NEXT: br i1 [[CMP_I]], label %[[IF_THEN_I:.*]], label %[[WHILE_COND_I14_I:.*]]326// AMDGCNSPIRV: [[IF_THEN_I]]:327// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[P]], i64 1328// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA9]]329// AMDGCNSPIRV-NEXT: switch i8 [[TMP1]], label %[[WHILE_COND_I_I:.*]] [330// AMDGCNSPIRV-NEXT: i8 120, label %[[IF_THEN5_I:.*]]331// AMDGCNSPIRV-NEXT: i8 88, label %[[IF_THEN5_I]]332// AMDGCNSPIRV-NEXT: ]333// AMDGCNSPIRV: [[IF_THEN5_I]]:334// AMDGCNSPIRV-NEXT: [[TMP2:%.*]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I]], align 1, !tbaa [[CHAR_TBAA9]]335// AMDGCNSPIRV-NEXT: [[CMP_NOT_I31_I5:%.*]] = icmp eq i8 [[TMP2]], 0336// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I31_I5]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT:.*]], label %[[WHILE_BODY_I32_I:.*]]337// AMDGCNSPIRV: [[WHILE_BODY_I32_I]]:338// AMDGCNSPIRV-NEXT: [[TMP3:%.*]] = phi i8 [ [[TMP7:%.*]], %[[IF_END31_I_I:.*]] ], [ [[TMP2]], %[[IF_THEN5_I]] ]339// AMDGCNSPIRV-NEXT: [[__R_0_I30_I7:%.*]] = phi i64 [ [[ADD28_I_I:%.*]], %[[IF_END31_I_I]] ], [ 0, %[[IF_THEN5_I]] ]340// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I29_I6:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I36_I:%.*]], %[[IF_END31_I_I]] ], [ [[INCDEC_PTR_I]], %[[IF_THEN5_I]] ]341// AMDGCNSPIRV-NEXT: [[TMP4:%.*]] = add i8 [[TMP3]], -48342// AMDGCNSPIRV-NEXT: [[OR_COND_I33_I:%.*]] = icmp ult i8 [[TMP4]], 10343// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I33_I]], label %[[IF_END31_I_I]], label %[[IF_ELSE_I_I:.*]]344// AMDGCNSPIRV: [[IF_ELSE_I_I]]:345// AMDGCNSPIRV-NEXT: [[TMP5:%.*]] = add i8 [[TMP3]], -97346// AMDGCNSPIRV-NEXT: [[OR_COND33_I_I:%.*]] = icmp ult i8 [[TMP5]], 6347// AMDGCNSPIRV-NEXT: br i1 [[OR_COND33_I_I]], label %[[IF_END31_I_I]], label %[[IF_ELSE17_I_I:.*]]348// AMDGCNSPIRV: [[IF_ELSE17_I_I]]:349// AMDGCNSPIRV-NEXT: [[TMP6:%.*]] = add i8 [[TMP3]], -65350// AMDGCNSPIRV-NEXT: [[OR_COND34_I_I:%.*]] = icmp ult i8 [[TMP6]], 6351// AMDGCNSPIRV-NEXT: br i1 [[OR_COND34_I_I]], label %[[IF_END31_I_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]]352// AMDGCNSPIRV: [[IF_END31_I_I]]:353// AMDGCNSPIRV-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I32_I]] ], [ -87, %[[IF_ELSE_I_I]] ], [ -55, %[[IF_ELSE17_I_I]] ]354// AMDGCNSPIRV-NEXT: [[MUL24_I_I:%.*]] = shl i64 [[__R_0_I30_I7]], 4355// AMDGCNSPIRV-NEXT: [[CONV25_I_I:%.*]] = zext nneg i8 [[TMP3]] to i64356// AMDGCNSPIRV-NEXT: [[ADD26_I_I:%.*]] = add i64 [[MUL24_I_I]], [[DOTSINK]]357// AMDGCNSPIRV-NEXT: [[ADD28_I_I]] = add i64 [[ADD26_I_I]], [[CONV25_I_I]]358// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I36_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I29_I6]], i64 1359// AMDGCNSPIRV-NEXT: [[TMP7]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I36_I]], align 1, !tbaa [[CHAR_TBAA9]]360// AMDGCNSPIRV-NEXT: [[CMP_NOT_I31_I:%.*]] = icmp eq i8 [[TMP7]], 0361// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I31_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I32_I]], !llvm.loop [[LOOP14]]362// AMDGCNSPIRV: [[WHILE_COND_I_I]]:363// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I_I:%.*]] = phi ptr addrspace(4) [ [[__TAGP_ADDR_1_I_I:%.*]], %[[WHILE_BODY_I_I:.*]] ], [ [[INCDEC_PTR_I]], %[[IF_THEN_I]] ]364// AMDGCNSPIRV-NEXT: [[__R_0_I_I:%.*]] = phi i64 [ [[__R_1_I_I:%.*]], %[[WHILE_BODY_I_I]] ], [ 0, %[[IF_THEN_I]] ]365// AMDGCNSPIRV-NEXT: [[TMP8:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I_I]], align 1, !tbaa [[CHAR_TBAA9]]366// AMDGCNSPIRV-NEXT: [[CMP_NOT_I_I:%.*]] = icmp eq i8 [[TMP8]], 0367// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I_I]]368// AMDGCNSPIRV: [[WHILE_BODY_I_I]]:369// AMDGCNSPIRV-NEXT: [[TMP9:%.*]] = and i8 [[TMP8]], -8370// AMDGCNSPIRV-NEXT: [[OR_COND_I_I:%.*]] = icmp eq i8 [[TMP9]], 48371// AMDGCNSPIRV-NEXT: [[MUL_I_I:%.*]] = shl i64 [[__R_0_I_I]], 3372// AMDGCNSPIRV-NEXT: [[CONV5_I_I:%.*]] = zext nneg i8 [[TMP8]] to i64373// AMDGCNSPIRV-NEXT: [[ADD_I_I:%.*]] = add i64 [[MUL_I_I]], -48374// AMDGCNSPIRV-NEXT: [[SUB_I_I:%.*]] = add i64 [[ADD_I_I]], [[CONV5_I_I]]375// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_I_IDX:%.*]] = zext i1 [[OR_COND_I_I]] to i64376// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I_I]], i64 [[__TAGP_ADDR_1_I_I_IDX]]377// AMDGCNSPIRV-NEXT: [[__R_1_I_I]] = select i1 [[OR_COND_I_I]], i64 [[SUB_I_I]], i64 [[__R_0_I_I]]378// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I_I]], label %[[WHILE_COND_I_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], !llvm.loop [[LOOP10]]379// AMDGCNSPIRV: [[WHILE_COND_I14_I]]:380// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I15_I:%.*]] = phi ptr addrspace(4) [ [[__TAGP_ADDR_1_I25_I:%.*]], %[[WHILE_BODY_I18_I:.*]] ], [ [[P]], %[[ENTRY]] ]381// AMDGCNSPIRV-NEXT: [[__R_0_I16_I:%.*]] = phi i64 [ [[__R_1_I26_I:%.*]], %[[WHILE_BODY_I18_I]] ], [ 0, %[[ENTRY]] ]382// AMDGCNSPIRV-NEXT: [[TMP10:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I15_I]], align 1, !tbaa [[CHAR_TBAA9]]383// AMDGCNSPIRV-NEXT: [[CMP_NOT_I17_I:%.*]] = icmp eq i8 [[TMP10]], 0384// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I17_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], label %[[WHILE_BODY_I18_I]]385// AMDGCNSPIRV: [[WHILE_BODY_I18_I]]:386// AMDGCNSPIRV-NEXT: [[TMP11:%.*]] = add i8 [[TMP10]], -48387// AMDGCNSPIRV-NEXT: [[OR_COND_I19_I:%.*]] = icmp ult i8 [[TMP11]], 10388// AMDGCNSPIRV-NEXT: [[MUL_I20_I:%.*]] = mul i64 [[__R_0_I16_I]], 10389// AMDGCNSPIRV-NEXT: [[CONV5_I21_I:%.*]] = zext nneg i8 [[TMP10]] to i64390// AMDGCNSPIRV-NEXT: [[ADD_I22_I:%.*]] = add i64 [[MUL_I20_I]], -48391// AMDGCNSPIRV-NEXT: [[SUB_I23_I:%.*]] = add i64 [[ADD_I22_I]], [[CONV5_I21_I]]392// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I25_I_IDX:%.*]] = zext i1 [[OR_COND_I19_I]] to i64393// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I25_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I15_I]], i64 [[__TAGP_ADDR_1_I25_I_IDX]]394// AMDGCNSPIRV-NEXT: [[__R_1_I26_I]] = select i1 [[OR_COND_I19_I]], i64 [[SUB_I23_I]], i64 [[__R_0_I16_I]]395// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I19_I]], label %[[WHILE_COND_I14_I]], label %[[_ZL15__MAKE_MANTISSAPKC_EXIT]], !llvm.loop [[LOOP13]]396// AMDGCNSPIRV: [[_ZL15__MAKE_MANTISSAPKC_EXIT]]:397// AMDGCNSPIRV-NEXT: [[RETVAL_0_I:%.*]] = phi i64 [ 0, %[[IF_THEN5_I]] ], [ 0, %[[WHILE_BODY_I_I]] ], [ [[__R_0_I_I]], %[[WHILE_COND_I_I]] ], [ [[ADD28_I_I]], %[[IF_END31_I_I]] ], [ 0, %[[IF_ELSE17_I_I]] ], [ 0, %[[WHILE_BODY_I18_I]] ], [ [[__R_0_I16_I]], %[[WHILE_COND_I14_I]] ]398// AMDGCNSPIRV-NEXT: ret i64 [[RETVAL_0_I]]399//400extern "C" __device__ uint64_t test___make_mantissa(const char *p) {401 return __make_mantissa(p);402}403 404// CHECK-LABEL: define dso_local noundef range(i32 0, -2147483648) i32 @test_abs(405// CHECK-SAME: i32 noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+]] {406// CHECK-NEXT: [[ENTRY:.*:]]407// CHECK-NEXT: [[TMP0:%.*]] = tail call noundef range(i32 0, -2147483648) i32 @llvm.abs.i32(i32 [[X]], i1 true)408// CHECK-NEXT: ret i32 [[TMP0]]409//410// AMDGCNSPIRV-LABEL: define spir_func noundef range(i32 0, -2147483648) i32 @test_abs(411// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3:[0-9]+]] {412// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]413// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call noundef range(i32 0, -2147483648) addrspace(4) i32 @llvm.abs.i32(i32 [[X]], i1 true)414// AMDGCNSPIRV-NEXT: ret i32 [[TMP0]]415//416extern "C" __device__ int test_abs(int x) {417 return abs(x);418}419 420// CHECK-LABEL: define dso_local noundef range(i64 0, -9223372036854775808) i64 @test_labs(421// CHECK-SAME: i64 noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {422// CHECK-NEXT: [[ENTRY:.*:]]423// CHECK-NEXT: [[TMP0:%.*]] = tail call noundef range(i64 0, -9223372036854775808) i64 @llvm.abs.i64(i64 [[X]], i1 true)424// CHECK-NEXT: ret i64 [[TMP0]]425//426// AMDGCNSPIRV-LABEL: define spir_func noundef range(i64 0, -9223372036854775808) i64 @test_labs(427// AMDGCNSPIRV-SAME: i64 noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {428// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]429// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call noundef range(i64 0, -9223372036854775808) addrspace(4) i64 @llvm.abs.i64(i64 [[X]], i1 true)430// AMDGCNSPIRV-NEXT: ret i64 [[TMP0]]431//432extern "C" __device__ long test_labs(long x) {433 return labs(x);434}435 436// CHECK-LABEL: define dso_local noundef range(i64 0, -9223372036854775808) i64 @test_llabs(437// CHECK-SAME: i64 noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {438// CHECK-NEXT: [[ENTRY:.*:]]439// CHECK-NEXT: [[TMP0:%.*]] = tail call noundef range(i64 0, -9223372036854775808) i64 @llvm.abs.i64(i64 [[X]], i1 true)440// CHECK-NEXT: ret i64 [[TMP0]]441//442// AMDGCNSPIRV-LABEL: define spir_func noundef range(i64 0, -9223372036854775808) i64 @test_llabs(443// AMDGCNSPIRV-SAME: i64 noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {444// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]445// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call noundef range(i64 0, -9223372036854775808) addrspace(4) i64 @llvm.abs.i64(i64 [[X]], i1 true)446// AMDGCNSPIRV-NEXT: ret i64 [[TMP0]]447//448extern "C" __device__ long long test_llabs(long x) {449 return llabs(x);450}451 452// DEFAULT-LABEL: define dso_local noundef float @test_acosf(453// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4:[0-9]+]] {454// DEFAULT-NEXT: [[ENTRY:.*:]]455// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_acos_f32(float noundef [[X]]) #[[ATTR12:[0-9]+]]456// DEFAULT-NEXT: ret float [[CALL_I]]457//458// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_acosf(459// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4:[0-9]+]] {460// FINITEONLY-NEXT: [[ENTRY:.*:]]461// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_acos_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR12:[0-9]+]]462// FINITEONLY-NEXT: ret float [[CALL_I]]463//464// APPROX-LABEL: define dso_local noundef float @test_acosf(465// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4:[0-9]+]] {466// APPROX-NEXT: [[ENTRY:.*:]]467// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_acos_f32(float noundef [[X]]) #[[ATTR12:[0-9]+]]468// APPROX-NEXT: ret float [[CALL_I]]469//470// NCRDIV-LABEL: define dso_local noundef float @test_acosf(471// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4:[0-9]+]] {472// NCRDIV-NEXT: [[ENTRY:.*:]]473// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_acos_f32(float noundef [[X]]) #[[ATTR12:[0-9]+]]474// NCRDIV-NEXT: ret float [[CALL_I]]475//476// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_acosf(477// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4:[0-9]+]] {478// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]479// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_acos_f32(float noundef [[X]]) #[[ATTR12:[0-9]+]]480// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]481//482extern "C" __device__ float test_acosf(float x) {483 return acosf(x);484}485 486// DEFAULT-LABEL: define dso_local noundef double @test_acos(487// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {488// DEFAULT-NEXT: [[ENTRY:.*:]]489// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_acos_f64(double noundef [[X]]) #[[ATTR12]]490// DEFAULT-NEXT: ret double [[CALL_I]]491//492// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_acos(493// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {494// FINITEONLY-NEXT: [[ENTRY:.*:]]495// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_acos_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]496// FINITEONLY-NEXT: ret double [[CALL_I]]497//498// APPROX-LABEL: define dso_local noundef double @test_acos(499// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {500// APPROX-NEXT: [[ENTRY:.*:]]501// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_acos_f64(double noundef [[X]]) #[[ATTR12]]502// APPROX-NEXT: ret double [[CALL_I]]503//504// NCRDIV-LABEL: define dso_local noundef double @test_acos(505// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {506// NCRDIV-NEXT: [[ENTRY:.*:]]507// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_acos_f64(double noundef [[X]]) #[[ATTR12]]508// NCRDIV-NEXT: ret double [[CALL_I]]509//510// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_acos(511// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {512// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]513// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_acos_f64(double noundef [[X]]) #[[ATTR12]]514// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]515//516extern "C" __device__ double test_acos(double x) {517 return acos(x);518}519 520// DEFAULT-LABEL: define dso_local noundef float @test_acoshf(521// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+]] {522// DEFAULT-NEXT: [[ENTRY:.*:]]523// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_acosh_f32(float noundef [[X]]) #[[ATTR13:[0-9]+]]524// DEFAULT-NEXT: ret float [[CALL_I]]525//526// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_acoshf(527// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+]] {528// FINITEONLY-NEXT: [[ENTRY:.*:]]529// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_acosh_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13:[0-9]+]]530// FINITEONLY-NEXT: ret float [[CALL_I]]531//532// APPROX-LABEL: define dso_local noundef float @test_acoshf(533// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+]] {534// APPROX-NEXT: [[ENTRY:.*:]]535// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_acosh_f32(float noundef [[X]]) #[[ATTR13:[0-9]+]]536// APPROX-NEXT: ret float [[CALL_I]]537//538// NCRDIV-LABEL: define dso_local noundef float @test_acoshf(539// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+]] {540// NCRDIV-NEXT: [[ENTRY:.*:]]541// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_acosh_f32(float noundef [[X]]) #[[ATTR13:[0-9]+]]542// NCRDIV-NEXT: ret float [[CALL_I]]543//544// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_acoshf(545// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5:[0-9]+]] {546// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]547// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_acosh_f32(float noundef [[X]]) #[[ATTR13:[0-9]+]]548// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]549//550extern "C" __device__ float test_acoshf(float x) {551 return acoshf(x);552}553 554// DEFAULT-LABEL: define dso_local noundef double @test_acosh(555// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {556// DEFAULT-NEXT: [[ENTRY:.*:]]557// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_acosh_f64(double noundef [[X]]) #[[ATTR13]]558// DEFAULT-NEXT: ret double [[CALL_I]]559//560// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_acosh(561// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {562// FINITEONLY-NEXT: [[ENTRY:.*:]]563// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_acosh_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]564// FINITEONLY-NEXT: ret double [[CALL_I]]565//566// APPROX-LABEL: define dso_local noundef double @test_acosh(567// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {568// APPROX-NEXT: [[ENTRY:.*:]]569// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_acosh_f64(double noundef [[X]]) #[[ATTR13]]570// APPROX-NEXT: ret double [[CALL_I]]571//572// NCRDIV-LABEL: define dso_local noundef double @test_acosh(573// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {574// NCRDIV-NEXT: [[ENTRY:.*:]]575// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_acosh_f64(double noundef [[X]]) #[[ATTR13]]576// NCRDIV-NEXT: ret double [[CALL_I]]577//578// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_acosh(579// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {580// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]581// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_acosh_f64(double noundef [[X]]) #[[ATTR13]]582// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]583//584extern "C" __device__ double test_acosh(double x) {585 return acosh(x);586}587 588// DEFAULT-LABEL: define dso_local noundef float @test_asinf(589// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {590// DEFAULT-NEXT: [[ENTRY:.*:]]591// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_asin_f32(float noundef [[X]]) #[[ATTR12]]592// DEFAULT-NEXT: ret float [[CALL_I]]593//594// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_asinf(595// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {596// FINITEONLY-NEXT: [[ENTRY:.*:]]597// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_asin_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]598// FINITEONLY-NEXT: ret float [[CALL_I]]599//600// APPROX-LABEL: define dso_local noundef float @test_asinf(601// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {602// APPROX-NEXT: [[ENTRY:.*:]]603// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_asin_f32(float noundef [[X]]) #[[ATTR12]]604// APPROX-NEXT: ret float [[CALL_I]]605//606// NCRDIV-LABEL: define dso_local noundef float @test_asinf(607// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {608// NCRDIV-NEXT: [[ENTRY:.*:]]609// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_asin_f32(float noundef [[X]]) #[[ATTR12]]610// NCRDIV-NEXT: ret float [[CALL_I]]611//612// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_asinf(613// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {614// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]615// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_asin_f32(float noundef [[X]]) #[[ATTR12]]616// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]617//618extern "C" __device__ float test_asinf(float x) {619 return asinf(x);620}621 622// DEFAULT-LABEL: define dso_local noundef double @test_asin(623// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {624// DEFAULT-NEXT: [[ENTRY:.*:]]625// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_asin_f64(double noundef [[X]]) #[[ATTR12]]626// DEFAULT-NEXT: ret double [[CALL_I]]627//628// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_asin(629// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {630// FINITEONLY-NEXT: [[ENTRY:.*:]]631// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_asin_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]632// FINITEONLY-NEXT: ret double [[CALL_I]]633//634// APPROX-LABEL: define dso_local noundef double @test_asin(635// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {636// APPROX-NEXT: [[ENTRY:.*:]]637// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_asin_f64(double noundef [[X]]) #[[ATTR12]]638// APPROX-NEXT: ret double [[CALL_I]]639//640// NCRDIV-LABEL: define dso_local noundef double @test_asin(641// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {642// NCRDIV-NEXT: [[ENTRY:.*:]]643// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_asin_f64(double noundef [[X]]) #[[ATTR12]]644// NCRDIV-NEXT: ret double [[CALL_I]]645//646// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_asin(647// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {648// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]649// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_asin_f64(double noundef [[X]]) #[[ATTR12]]650// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]651//652extern "C" __device__ double test_asin(double x) {653 654 return asin(x);655}656 657// DEFAULT-LABEL: define dso_local noundef float @test_asinhf(658// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {659// DEFAULT-NEXT: [[ENTRY:.*:]]660// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_asinh_f32(float noundef [[X]]) #[[ATTR13]]661// DEFAULT-NEXT: ret float [[CALL_I]]662//663// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_asinhf(664// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {665// FINITEONLY-NEXT: [[ENTRY:.*:]]666// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_asinh_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]667// FINITEONLY-NEXT: ret float [[CALL_I]]668//669// APPROX-LABEL: define dso_local noundef float @test_asinhf(670// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {671// APPROX-NEXT: [[ENTRY:.*:]]672// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_asinh_f32(float noundef [[X]]) #[[ATTR13]]673// APPROX-NEXT: ret float [[CALL_I]]674//675// NCRDIV-LABEL: define dso_local noundef float @test_asinhf(676// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {677// NCRDIV-NEXT: [[ENTRY:.*:]]678// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_asinh_f32(float noundef [[X]]) #[[ATTR13]]679// NCRDIV-NEXT: ret float [[CALL_I]]680//681// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_asinhf(682// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {683// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]684// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_asinh_f32(float noundef [[X]]) #[[ATTR13]]685// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]686//687extern "C" __device__ float test_asinhf(float x) {688 return asinhf(x);689}690 691// DEFAULT-LABEL: define dso_local noundef double @test_asinh(692// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {693// DEFAULT-NEXT: [[ENTRY:.*:]]694// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_asinh_f64(double noundef [[X]]) #[[ATTR13]]695// DEFAULT-NEXT: ret double [[CALL_I]]696//697// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_asinh(698// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {699// FINITEONLY-NEXT: [[ENTRY:.*:]]700// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_asinh_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]701// FINITEONLY-NEXT: ret double [[CALL_I]]702//703// APPROX-LABEL: define dso_local noundef double @test_asinh(704// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {705// APPROX-NEXT: [[ENTRY:.*:]]706// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_asinh_f64(double noundef [[X]]) #[[ATTR13]]707// APPROX-NEXT: ret double [[CALL_I]]708//709// NCRDIV-LABEL: define dso_local noundef double @test_asinh(710// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {711// NCRDIV-NEXT: [[ENTRY:.*:]]712// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_asinh_f64(double noundef [[X]]) #[[ATTR13]]713// NCRDIV-NEXT: ret double [[CALL_I]]714//715// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_asinh(716// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {717// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]718// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_asinh_f64(double noundef [[X]]) #[[ATTR13]]719// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]720//721extern "C" __device__ double test_asinh(double x) {722 return asinh(x);723}724 725// DEFAULT-LABEL: define dso_local noundef float @test_atan2f(726// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {727// DEFAULT-NEXT: [[ENTRY:.*:]]728// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atan2_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]729// DEFAULT-NEXT: ret float [[CALL_I]]730//731// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_atan2f(732// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {733// FINITEONLY-NEXT: [[ENTRY:.*:]]734// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_atan2_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]735// FINITEONLY-NEXT: ret float [[CALL_I]]736//737// APPROX-LABEL: define dso_local noundef float @test_atan2f(738// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {739// APPROX-NEXT: [[ENTRY:.*:]]740// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atan2_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]741// APPROX-NEXT: ret float [[CALL_I]]742//743// NCRDIV-LABEL: define dso_local noundef float @test_atan2f(744// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {745// NCRDIV-NEXT: [[ENTRY:.*:]]746// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atan2_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]747// NCRDIV-NEXT: ret float [[CALL_I]]748//749// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_atan2f(750// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {751// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]752// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_atan2_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]753// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]754//755extern "C" __device__ float test_atan2f(float x, float y) {756 return atan2f(x, y);757}758 759// DEFAULT-LABEL: define dso_local noundef double @test_atan2(760// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {761// DEFAULT-NEXT: [[ENTRY:.*:]]762// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atan2_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]763// DEFAULT-NEXT: ret double [[CALL_I]]764//765// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_atan2(766// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {767// FINITEONLY-NEXT: [[ENTRY:.*:]]768// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_atan2_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]769// FINITEONLY-NEXT: ret double [[CALL_I]]770//771// APPROX-LABEL: define dso_local noundef double @test_atan2(772// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {773// APPROX-NEXT: [[ENTRY:.*:]]774// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atan2_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]775// APPROX-NEXT: ret double [[CALL_I]]776//777// NCRDIV-LABEL: define dso_local noundef double @test_atan2(778// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {779// NCRDIV-NEXT: [[ENTRY:.*:]]780// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atan2_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]781// NCRDIV-NEXT: ret double [[CALL_I]]782//783// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_atan2(784// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {785// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]786// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_atan2_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]787// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]788//789extern "C" __device__ double test_atan2(double x, double y) {790 return atan2(x, y);791}792 793// DEFAULT-LABEL: define dso_local noundef float @test_atanf(794// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {795// DEFAULT-NEXT: [[ENTRY:.*:]]796// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atan_f32(float noundef [[X]]) #[[ATTR12]]797// DEFAULT-NEXT: ret float [[CALL_I]]798//799// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_atanf(800// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {801// FINITEONLY-NEXT: [[ENTRY:.*:]]802// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_atan_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]803// FINITEONLY-NEXT: ret float [[CALL_I]]804//805// APPROX-LABEL: define dso_local noundef float @test_atanf(806// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {807// APPROX-NEXT: [[ENTRY:.*:]]808// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atan_f32(float noundef [[X]]) #[[ATTR12]]809// APPROX-NEXT: ret float [[CALL_I]]810//811// NCRDIV-LABEL: define dso_local noundef float @test_atanf(812// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {813// NCRDIV-NEXT: [[ENTRY:.*:]]814// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atan_f32(float noundef [[X]]) #[[ATTR12]]815// NCRDIV-NEXT: ret float [[CALL_I]]816//817// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_atanf(818// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {819// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]820// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_atan_f32(float noundef [[X]]) #[[ATTR12]]821// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]822//823extern "C" __device__ float test_atanf(float x) {824 return atanf(x);825}826 827// DEFAULT-LABEL: define dso_local noundef double @test_atan(828// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {829// DEFAULT-NEXT: [[ENTRY:.*:]]830// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atan_f64(double noundef [[X]]) #[[ATTR12]]831// DEFAULT-NEXT: ret double [[CALL_I]]832//833// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_atan(834// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {835// FINITEONLY-NEXT: [[ENTRY:.*:]]836// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_atan_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]837// FINITEONLY-NEXT: ret double [[CALL_I]]838//839// APPROX-LABEL: define dso_local noundef double @test_atan(840// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {841// APPROX-NEXT: [[ENTRY:.*:]]842// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atan_f64(double noundef [[X]]) #[[ATTR12]]843// APPROX-NEXT: ret double [[CALL_I]]844//845// NCRDIV-LABEL: define dso_local noundef double @test_atan(846// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {847// NCRDIV-NEXT: [[ENTRY:.*:]]848// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atan_f64(double noundef [[X]]) #[[ATTR12]]849// NCRDIV-NEXT: ret double [[CALL_I]]850//851// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_atan(852// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {853// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]854// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_atan_f64(double noundef [[X]]) #[[ATTR12]]855// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]856//857extern "C" __device__ double test_atan(double x) {858 return atan(x);859}860 861// DEFAULT-LABEL: define dso_local noundef float @test_atanhf(862// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {863// DEFAULT-NEXT: [[ENTRY:.*:]]864// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atanh_f32(float noundef [[X]]) #[[ATTR13]]865// DEFAULT-NEXT: ret float [[CALL_I]]866//867// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_atanhf(868// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {869// FINITEONLY-NEXT: [[ENTRY:.*:]]870// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_atanh_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]871// FINITEONLY-NEXT: ret float [[CALL_I]]872//873// APPROX-LABEL: define dso_local noundef float @test_atanhf(874// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {875// APPROX-NEXT: [[ENTRY:.*:]]876// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atanh_f32(float noundef [[X]]) #[[ATTR13]]877// APPROX-NEXT: ret float [[CALL_I]]878//879// NCRDIV-LABEL: define dso_local noundef float @test_atanhf(880// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {881// NCRDIV-NEXT: [[ENTRY:.*:]]882// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_atanh_f32(float noundef [[X]]) #[[ATTR13]]883// NCRDIV-NEXT: ret float [[CALL_I]]884//885// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_atanhf(886// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {887// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]888// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_atanh_f32(float noundef [[X]]) #[[ATTR13]]889// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]890//891extern "C" __device__ float test_atanhf(float x) {892 return atanhf(x);893}894 895// DEFAULT-LABEL: define dso_local noundef double @test_atanh(896// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {897// DEFAULT-NEXT: [[ENTRY:.*:]]898// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atanh_f64(double noundef [[X]]) #[[ATTR13]]899// DEFAULT-NEXT: ret double [[CALL_I]]900//901// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_atanh(902// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {903// FINITEONLY-NEXT: [[ENTRY:.*:]]904// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_atanh_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]905// FINITEONLY-NEXT: ret double [[CALL_I]]906//907// APPROX-LABEL: define dso_local noundef double @test_atanh(908// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {909// APPROX-NEXT: [[ENTRY:.*:]]910// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atanh_f64(double noundef [[X]]) #[[ATTR13]]911// APPROX-NEXT: ret double [[CALL_I]]912//913// NCRDIV-LABEL: define dso_local noundef double @test_atanh(914// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {915// NCRDIV-NEXT: [[ENTRY:.*:]]916// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_atanh_f64(double noundef [[X]]) #[[ATTR13]]917// NCRDIV-NEXT: ret double [[CALL_I]]918//919// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_atanh(920// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {921// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]922// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_atanh_f64(double noundef [[X]]) #[[ATTR13]]923// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]924//925extern "C" __device__ double test_atanh(double x) {926 return atanh(x);927}928 929// DEFAULT-LABEL: define dso_local noundef float @test_cbrtf(930// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {931// DEFAULT-NEXT: [[ENTRY:.*:]]932// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cbrt_f32(float noundef [[X]]) #[[ATTR13]]933// DEFAULT-NEXT: ret float [[CALL_I]]934//935// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_cbrtf(936// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {937// FINITEONLY-NEXT: [[ENTRY:.*:]]938// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_cbrt_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]939// FINITEONLY-NEXT: ret float [[CALL_I]]940//941// APPROX-LABEL: define dso_local noundef float @test_cbrtf(942// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {943// APPROX-NEXT: [[ENTRY:.*:]]944// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cbrt_f32(float noundef [[X]]) #[[ATTR13]]945// APPROX-NEXT: ret float [[CALL_I]]946//947// NCRDIV-LABEL: define dso_local noundef float @test_cbrtf(948// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {949// NCRDIV-NEXT: [[ENTRY:.*:]]950// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cbrt_f32(float noundef [[X]]) #[[ATTR13]]951// NCRDIV-NEXT: ret float [[CALL_I]]952//953// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_cbrtf(954// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {955// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]956// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_cbrt_f32(float noundef [[X]]) #[[ATTR13]]957// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]958//959extern "C" __device__ float test_cbrtf(float x) {960 return cbrtf(x);961}962 963// DEFAULT-LABEL: define dso_local noundef double @test_cbrt(964// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {965// DEFAULT-NEXT: [[ENTRY:.*:]]966// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cbrt_f64(double noundef [[X]]) #[[ATTR13]]967// DEFAULT-NEXT: ret double [[CALL_I]]968//969// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_cbrt(970// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {971// FINITEONLY-NEXT: [[ENTRY:.*:]]972// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_cbrt_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]973// FINITEONLY-NEXT: ret double [[CALL_I]]974//975// APPROX-LABEL: define dso_local noundef double @test_cbrt(976// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {977// APPROX-NEXT: [[ENTRY:.*:]]978// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cbrt_f64(double noundef [[X]]) #[[ATTR13]]979// APPROX-NEXT: ret double [[CALL_I]]980//981// NCRDIV-LABEL: define dso_local noundef double @test_cbrt(982// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {983// NCRDIV-NEXT: [[ENTRY:.*:]]984// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cbrt_f64(double noundef [[X]]) #[[ATTR13]]985// NCRDIV-NEXT: ret double [[CALL_I]]986//987// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_cbrt(988// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {989// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]990// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_cbrt_f64(double noundef [[X]]) #[[ATTR13]]991// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]992//993extern "C" __device__ double test_cbrt(double x) {994 return cbrt(x);995}996 997// DEFAULT-LABEL: define dso_local noundef float @test_ceilf(998// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {999// DEFAULT-NEXT: [[ENTRY:.*:]]1000// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ceil.f32(float [[X]])1001// DEFAULT-NEXT: ret float [[TMP0]]1002//1003// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_ceilf(1004// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1005// FINITEONLY-NEXT: [[ENTRY:.*:]]1006// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.ceil.f32(float nofpclass(nan inf) [[X]])1007// FINITEONLY-NEXT: ret float [[TMP0]]1008//1009// APPROX-LABEL: define dso_local noundef float @test_ceilf(1010// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1011// APPROX-NEXT: [[ENTRY:.*:]]1012// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ceil.f32(float [[X]])1013// APPROX-NEXT: ret float [[TMP0]]1014//1015// NCRDIV-LABEL: define dso_local noundef float @test_ceilf(1016// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1017// NCRDIV-NEXT: [[ENTRY:.*:]]1018// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ceil.f32(float [[X]])1019// NCRDIV-NEXT: ret float [[TMP0]]1020//1021// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_ceilf(1022// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1023// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1024// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.ceil.f32(float [[X]])1025// AMDGCNSPIRV-NEXT: ret float [[TMP0]]1026//1027extern "C" __device__ float test_ceilf(float x) {1028 return ceilf(x);1029}1030 1031// DEFAULT-LABEL: define dso_local noundef double @test_ceil(1032// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1033// DEFAULT-NEXT: [[ENTRY:.*:]]1034// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ceil.f64(double [[X]])1035// DEFAULT-NEXT: ret double [[TMP0]]1036//1037// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_ceil(1038// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1039// FINITEONLY-NEXT: [[ENTRY:.*:]]1040// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.ceil.f64(double nofpclass(nan inf) [[X]])1041// FINITEONLY-NEXT: ret double [[TMP0]]1042//1043// APPROX-LABEL: define dso_local noundef double @test_ceil(1044// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1045// APPROX-NEXT: [[ENTRY:.*:]]1046// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ceil.f64(double [[X]])1047// APPROX-NEXT: ret double [[TMP0]]1048//1049// NCRDIV-LABEL: define dso_local noundef double @test_ceil(1050// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1051// NCRDIV-NEXT: [[ENTRY:.*:]]1052// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ceil.f64(double [[X]])1053// NCRDIV-NEXT: ret double [[TMP0]]1054//1055// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_ceil(1056// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1057// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1058// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.ceil.f64(double [[X]])1059// AMDGCNSPIRV-NEXT: ret double [[TMP0]]1060//1061extern "C" __device__ double test_ceil(double x) {1062 return ceil(x);1063}1064 1065// DEFAULT-LABEL: define dso_local noundef float @test_copysignf(1066// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1067// DEFAULT-NEXT: [[ENTRY:.*:]]1068// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.copysign.f32(float [[X]], float [[Y]])1069// DEFAULT-NEXT: ret float [[TMP0]]1070//1071// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_copysignf(1072// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1073// FINITEONLY-NEXT: [[ENTRY:.*:]]1074// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.copysign.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]])1075// FINITEONLY-NEXT: ret float [[TMP0]]1076//1077// APPROX-LABEL: define dso_local noundef float @test_copysignf(1078// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1079// APPROX-NEXT: [[ENTRY:.*:]]1080// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.copysign.f32(float [[X]], float [[Y]])1081// APPROX-NEXT: ret float [[TMP0]]1082//1083// NCRDIV-LABEL: define dso_local noundef float @test_copysignf(1084// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1085// NCRDIV-NEXT: [[ENTRY:.*:]]1086// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.copysign.f32(float [[X]], float [[Y]])1087// NCRDIV-NEXT: ret float [[TMP0]]1088//1089// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_copysignf(1090// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1091// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1092// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.copysign.f32(float [[X]], float [[Y]])1093// AMDGCNSPIRV-NEXT: ret float [[TMP0]]1094//1095extern "C" __device__ float test_copysignf(float x, float y) {1096 return copysignf(x, y);1097}1098 1099// DEFAULT-LABEL: define dso_local noundef double @test_copysign(1100// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1101// DEFAULT-NEXT: [[ENTRY:.*:]]1102// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.copysign.f64(double [[X]], double [[Y]])1103// DEFAULT-NEXT: ret double [[TMP0]]1104//1105// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_copysign(1106// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1107// FINITEONLY-NEXT: [[ENTRY:.*:]]1108// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.copysign.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]])1109// FINITEONLY-NEXT: ret double [[TMP0]]1110//1111// APPROX-LABEL: define dso_local noundef double @test_copysign(1112// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1113// APPROX-NEXT: [[ENTRY:.*:]]1114// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.copysign.f64(double [[X]], double [[Y]])1115// APPROX-NEXT: ret double [[TMP0]]1116//1117// NCRDIV-LABEL: define dso_local noundef double @test_copysign(1118// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {1119// NCRDIV-NEXT: [[ENTRY:.*:]]1120// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.copysign.f64(double [[X]], double [[Y]])1121// NCRDIV-NEXT: ret double [[TMP0]]1122//1123// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_copysign(1124// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1125// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1126// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.copysign.f64(double [[X]], double [[Y]])1127// AMDGCNSPIRV-NEXT: ret double [[TMP0]]1128//1129extern "C" __device__ double test_copysign(double x, double y) {1130 return copysign(x, y);1131}1132 1133// DEFAULT-LABEL: define dso_local noundef float @test_cosf(1134// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6:[0-9]+]] {1135// DEFAULT-NEXT: [[ENTRY:.*:]]1136// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cos_f32(float noundef [[X]]) #[[ATTR14:[0-9]+]]1137// DEFAULT-NEXT: ret float [[CALL_I]]1138//1139// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_cosf(1140// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6:[0-9]+]] {1141// FINITEONLY-NEXT: [[ENTRY:.*:]]1142// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_cos_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14:[0-9]+]]1143// FINITEONLY-NEXT: ret float [[CALL_I]]1144//1145// APPROX-LABEL: define dso_local noundef float @test_cosf(1146// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6:[0-9]+]] {1147// APPROX-NEXT: [[ENTRY:.*:]]1148// APPROX-NEXT: [[CALL_I1:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14:[0-9]+]]1149// APPROX-NEXT: ret float [[CALL_I1]]1150//1151// NCRDIV-LABEL: define dso_local noundef float @test_cosf(1152// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6:[0-9]+]] {1153// NCRDIV-NEXT: [[ENTRY:.*:]]1154// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cos_f32(float noundef [[X]]) #[[ATTR14:[0-9]+]]1155// NCRDIV-NEXT: ret float [[CALL_I]]1156//1157// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_cosf(1158// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6:[0-9]+]] {1159// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1160// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_cos_f32(float noundef [[X]]) #[[ATTR14:[0-9]+]]1161// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1162//1163extern "C" __device__ float test_cosf(float x) {1164 return cosf(x);1165}1166 1167// DEFAULT-LABEL: define dso_local noundef double @test_cos(1168// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1169// DEFAULT-NEXT: [[ENTRY:.*:]]1170// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cos_f64(double noundef [[X]]) #[[ATTR14]]1171// DEFAULT-NEXT: ret double [[CALL_I]]1172//1173// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_cos(1174// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1175// FINITEONLY-NEXT: [[ENTRY:.*:]]1176// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_cos_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1177// FINITEONLY-NEXT: ret double [[CALL_I]]1178//1179// APPROX-LABEL: define dso_local noundef double @test_cos(1180// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1181// APPROX-NEXT: [[ENTRY:.*:]]1182// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cos_f64(double noundef [[X]]) #[[ATTR14]]1183// APPROX-NEXT: ret double [[CALL_I]]1184//1185// NCRDIV-LABEL: define dso_local noundef double @test_cos(1186// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1187// NCRDIV-NEXT: [[ENTRY:.*:]]1188// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cos_f64(double noundef [[X]]) #[[ATTR14]]1189// NCRDIV-NEXT: ret double [[CALL_I]]1190//1191// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_cos(1192// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1193// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1194// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_cos_f64(double noundef [[X]]) #[[ATTR14]]1195// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1196//1197extern "C" __device__ double test_cos(double x) {1198 return cos(x);1199}1200 1201// DEFAULT-LABEL: define dso_local noundef float @test_coshf(1202// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1203// DEFAULT-NEXT: [[ENTRY:.*:]]1204// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cosh_f32(float noundef [[X]]) #[[ATTR13]]1205// DEFAULT-NEXT: ret float [[CALL_I]]1206//1207// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_coshf(1208// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1209// FINITEONLY-NEXT: [[ENTRY:.*:]]1210// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_cosh_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1211// FINITEONLY-NEXT: ret float [[CALL_I]]1212//1213// APPROX-LABEL: define dso_local noundef float @test_coshf(1214// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1215// APPROX-NEXT: [[ENTRY:.*:]]1216// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cosh_f32(float noundef [[X]]) #[[ATTR13]]1217// APPROX-NEXT: ret float [[CALL_I]]1218//1219// NCRDIV-LABEL: define dso_local noundef float @test_coshf(1220// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1221// NCRDIV-NEXT: [[ENTRY:.*:]]1222// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cosh_f32(float noundef [[X]]) #[[ATTR13]]1223// NCRDIV-NEXT: ret float [[CALL_I]]1224//1225// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_coshf(1226// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1227// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1228// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_cosh_f32(float noundef [[X]]) #[[ATTR13]]1229// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1230//1231extern "C" __device__ float test_coshf(float x) {1232 return coshf(x);1233}1234 1235// DEFAULT-LABEL: define dso_local noundef double @test_cosh(1236// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1237// DEFAULT-NEXT: [[ENTRY:.*:]]1238// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cosh_f64(double noundef [[X]]) #[[ATTR13]]1239// DEFAULT-NEXT: ret double [[CALL_I]]1240//1241// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_cosh(1242// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1243// FINITEONLY-NEXT: [[ENTRY:.*:]]1244// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_cosh_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1245// FINITEONLY-NEXT: ret double [[CALL_I]]1246//1247// APPROX-LABEL: define dso_local noundef double @test_cosh(1248// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1249// APPROX-NEXT: [[ENTRY:.*:]]1250// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cosh_f64(double noundef [[X]]) #[[ATTR13]]1251// APPROX-NEXT: ret double [[CALL_I]]1252//1253// NCRDIV-LABEL: define dso_local noundef double @test_cosh(1254// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1255// NCRDIV-NEXT: [[ENTRY:.*:]]1256// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cosh_f64(double noundef [[X]]) #[[ATTR13]]1257// NCRDIV-NEXT: ret double [[CALL_I]]1258//1259// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_cosh(1260// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1261// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1262// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_cosh_f64(double noundef [[X]]) #[[ATTR13]]1263// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1264//1265extern "C" __device__ double test_cosh(double x) {1266 return cosh(x);1267}1268 1269// DEFAULT-LABEL: define dso_local noundef float @test_cospif(1270// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1271// DEFAULT-NEXT: [[ENTRY:.*:]]1272// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cospi_f32(float noundef [[X]]) #[[ATTR14]]1273// DEFAULT-NEXT: ret float [[CALL_I]]1274//1275// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_cospif(1276// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1277// FINITEONLY-NEXT: [[ENTRY:.*:]]1278// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_cospi_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1279// FINITEONLY-NEXT: ret float [[CALL_I]]1280//1281// APPROX-LABEL: define dso_local noundef float @test_cospif(1282// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1283// APPROX-NEXT: [[ENTRY:.*:]]1284// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cospi_f32(float noundef [[X]]) #[[ATTR14]]1285// APPROX-NEXT: ret float [[CALL_I]]1286//1287// NCRDIV-LABEL: define dso_local noundef float @test_cospif(1288// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1289// NCRDIV-NEXT: [[ENTRY:.*:]]1290// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_cospi_f32(float noundef [[X]]) #[[ATTR14]]1291// NCRDIV-NEXT: ret float [[CALL_I]]1292//1293// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_cospif(1294// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1295// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1296// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_cospi_f32(float noundef [[X]]) #[[ATTR14]]1297// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1298//1299extern "C" __device__ float test_cospif(float x) {1300 return cospif(x);1301}1302 1303// DEFAULT-LABEL: define dso_local noundef double @test_cospi(1304// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1305// DEFAULT-NEXT: [[ENTRY:.*:]]1306// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cospi_f64(double noundef [[X]]) #[[ATTR14]]1307// DEFAULT-NEXT: ret double [[CALL_I]]1308//1309// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_cospi(1310// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1311// FINITEONLY-NEXT: [[ENTRY:.*:]]1312// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_cospi_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1313// FINITEONLY-NEXT: ret double [[CALL_I]]1314//1315// APPROX-LABEL: define dso_local noundef double @test_cospi(1316// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1317// APPROX-NEXT: [[ENTRY:.*:]]1318// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cospi_f64(double noundef [[X]]) #[[ATTR14]]1319// APPROX-NEXT: ret double [[CALL_I]]1320//1321// NCRDIV-LABEL: define dso_local noundef double @test_cospi(1322// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1323// NCRDIV-NEXT: [[ENTRY:.*:]]1324// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_cospi_f64(double noundef [[X]]) #[[ATTR14]]1325// NCRDIV-NEXT: ret double [[CALL_I]]1326//1327// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_cospi(1328// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1329// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1330// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_cospi_f64(double noundef [[X]]) #[[ATTR14]]1331// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1332//1333extern "C" __device__ double test_cospi(double x) {1334 return cospi(x);1335}1336 1337// DEFAULT-LABEL: define dso_local noundef float @test_cyl_bessel_i0f(1338// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1339// DEFAULT-NEXT: [[ENTRY:.*:]]1340// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_i0_f32(float noundef [[X]]) #[[ATTR14]]1341// DEFAULT-NEXT: ret float [[CALL_I]]1342//1343// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_cyl_bessel_i0f(1344// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1345// FINITEONLY-NEXT: [[ENTRY:.*:]]1346// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_i0_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1347// FINITEONLY-NEXT: ret float [[CALL_I]]1348//1349// APPROX-LABEL: define dso_local noundef float @test_cyl_bessel_i0f(1350// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1351// APPROX-NEXT: [[ENTRY:.*:]]1352// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_i0_f32(float noundef [[X]]) #[[ATTR14]]1353// APPROX-NEXT: ret float [[CALL_I]]1354//1355// NCRDIV-LABEL: define dso_local noundef float @test_cyl_bessel_i0f(1356// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1357// NCRDIV-NEXT: [[ENTRY:.*:]]1358// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_i0_f32(float noundef [[X]]) #[[ATTR14]]1359// NCRDIV-NEXT: ret float [[CALL_I]]1360//1361// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_cyl_bessel_i0f(1362// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1363// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1364// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_i0_f32(float noundef [[X]]) #[[ATTR14]]1365// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1366//1367extern "C" __device__ float test_cyl_bessel_i0f(float x) {1368 return cyl_bessel_i0f(x);1369}1370 1371// DEFAULT-LABEL: define dso_local noundef double @test_cyl_bessel_i0(1372// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1373// DEFAULT-NEXT: [[ENTRY:.*:]]1374// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_i0_f64(double noundef [[X]]) #[[ATTR14]]1375// DEFAULT-NEXT: ret double [[CALL_I]]1376//1377// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_cyl_bessel_i0(1378// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1379// FINITEONLY-NEXT: [[ENTRY:.*:]]1380// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_i0_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1381// FINITEONLY-NEXT: ret double [[CALL_I]]1382//1383// APPROX-LABEL: define dso_local noundef double @test_cyl_bessel_i0(1384// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1385// APPROX-NEXT: [[ENTRY:.*:]]1386// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_i0_f64(double noundef [[X]]) #[[ATTR14]]1387// APPROX-NEXT: ret double [[CALL_I]]1388//1389// NCRDIV-LABEL: define dso_local noundef double @test_cyl_bessel_i0(1390// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1391// NCRDIV-NEXT: [[ENTRY:.*:]]1392// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_i0_f64(double noundef [[X]]) #[[ATTR14]]1393// NCRDIV-NEXT: ret double [[CALL_I]]1394//1395// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_cyl_bessel_i0(1396// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1397// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1398// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_i0_f64(double noundef [[X]]) #[[ATTR14]]1399// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1400//1401extern "C" __device__ double test_cyl_bessel_i0(double x) {1402 return cyl_bessel_i0(x);1403}1404 1405// DEFAULT-LABEL: define dso_local noundef float @test_cyl_bessel_i1f(1406// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1407// DEFAULT-NEXT: [[ENTRY:.*:]]1408// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_i1_f32(float noundef [[X]]) #[[ATTR14]]1409// DEFAULT-NEXT: ret float [[CALL_I]]1410//1411// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_cyl_bessel_i1f(1412// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1413// FINITEONLY-NEXT: [[ENTRY:.*:]]1414// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_i1_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1415// FINITEONLY-NEXT: ret float [[CALL_I]]1416//1417// APPROX-LABEL: define dso_local noundef float @test_cyl_bessel_i1f(1418// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1419// APPROX-NEXT: [[ENTRY:.*:]]1420// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_i1_f32(float noundef [[X]]) #[[ATTR14]]1421// APPROX-NEXT: ret float [[CALL_I]]1422//1423// NCRDIV-LABEL: define dso_local noundef float @test_cyl_bessel_i1f(1424// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1425// NCRDIV-NEXT: [[ENTRY:.*:]]1426// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_i1_f32(float noundef [[X]]) #[[ATTR14]]1427// NCRDIV-NEXT: ret float [[CALL_I]]1428//1429// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_cyl_bessel_i1f(1430// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1431// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1432// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_i1_f32(float noundef [[X]]) #[[ATTR14]]1433// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1434//1435extern "C" __device__ float test_cyl_bessel_i1f(float x) {1436 return cyl_bessel_i1f(x);1437}1438 1439// DEFAULT-LABEL: define dso_local noundef double @test_cyl_bessel_i1(1440// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1441// DEFAULT-NEXT: [[ENTRY:.*:]]1442// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_i1_f64(double noundef [[X]]) #[[ATTR14]]1443// DEFAULT-NEXT: ret double [[CALL_I]]1444//1445// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_cyl_bessel_i1(1446// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1447// FINITEONLY-NEXT: [[ENTRY:.*:]]1448// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_i1_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]1449// FINITEONLY-NEXT: ret double [[CALL_I]]1450//1451// APPROX-LABEL: define dso_local noundef double @test_cyl_bessel_i1(1452// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1453// APPROX-NEXT: [[ENTRY:.*:]]1454// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_i1_f64(double noundef [[X]]) #[[ATTR14]]1455// APPROX-NEXT: ret double [[CALL_I]]1456//1457// NCRDIV-LABEL: define dso_local noundef double @test_cyl_bessel_i1(1458// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {1459// NCRDIV-NEXT: [[ENTRY:.*:]]1460// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_i1_f64(double noundef [[X]]) #[[ATTR14]]1461// NCRDIV-NEXT: ret double [[CALL_I]]1462//1463// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_cyl_bessel_i1(1464// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {1465// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1466// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_i1_f64(double noundef [[X]]) #[[ATTR14]]1467// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1468//1469extern "C" __device__ double test_cyl_bessel_i1(double x) {1470 return cyl_bessel_i1(x);1471}1472 1473// DEFAULT-LABEL: define dso_local noundef float @test_erfcf(1474// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1475// DEFAULT-NEXT: [[ENTRY:.*:]]1476// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_erfc_f32(float noundef [[X]]) #[[ATTR13]]1477// DEFAULT-NEXT: ret float [[CALL_I]]1478//1479// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_erfcf(1480// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1481// FINITEONLY-NEXT: [[ENTRY:.*:]]1482// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_erfc_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1483// FINITEONLY-NEXT: ret float [[CALL_I]]1484//1485// APPROX-LABEL: define dso_local noundef float @test_erfcf(1486// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1487// APPROX-NEXT: [[ENTRY:.*:]]1488// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_erfc_f32(float noundef [[X]]) #[[ATTR13]]1489// APPROX-NEXT: ret float [[CALL_I]]1490//1491// NCRDIV-LABEL: define dso_local noundef float @test_erfcf(1492// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1493// NCRDIV-NEXT: [[ENTRY:.*:]]1494// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_erfc_f32(float noundef [[X]]) #[[ATTR13]]1495// NCRDIV-NEXT: ret float [[CALL_I]]1496//1497// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_erfcf(1498// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1499// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1500// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_erfc_f32(float noundef [[X]]) #[[ATTR13]]1501// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1502//1503extern "C" __device__ float test_erfcf(float x) {1504 return erfcf(x);1505}1506 1507// DEFAULT-LABEL: define dso_local noundef double @test_erfc(1508// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1509// DEFAULT-NEXT: [[ENTRY:.*:]]1510// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_erfc_f64(double noundef [[X]]) #[[ATTR13]]1511// DEFAULT-NEXT: ret double [[CALL_I]]1512//1513// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_erfc(1514// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1515// FINITEONLY-NEXT: [[ENTRY:.*:]]1516// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_erfc_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1517// FINITEONLY-NEXT: ret double [[CALL_I]]1518//1519// APPROX-LABEL: define dso_local noundef double @test_erfc(1520// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1521// APPROX-NEXT: [[ENTRY:.*:]]1522// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_erfc_f64(double noundef [[X]]) #[[ATTR13]]1523// APPROX-NEXT: ret double [[CALL_I]]1524//1525// NCRDIV-LABEL: define dso_local noundef double @test_erfc(1526// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1527// NCRDIV-NEXT: [[ENTRY:.*:]]1528// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_erfc_f64(double noundef [[X]]) #[[ATTR13]]1529// NCRDIV-NEXT: ret double [[CALL_I]]1530//1531// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_erfc(1532// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1533// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1534// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_erfc_f64(double noundef [[X]]) #[[ATTR13]]1535// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1536//1537extern "C" __device__ double test_erfc(double x) {1538 return erfc(x);1539}1540 1541// DEFAULT-LABEL: define dso_local noundef float @test_erfinvf(1542// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1543// DEFAULT-NEXT: [[ENTRY:.*:]]1544// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_erfinv_f32(float noundef [[X]]) #[[ATTR13]]1545// DEFAULT-NEXT: ret float [[CALL_I]]1546//1547// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_erfinvf(1548// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1549// FINITEONLY-NEXT: [[ENTRY:.*:]]1550// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_erfinv_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1551// FINITEONLY-NEXT: ret float [[CALL_I]]1552//1553// APPROX-LABEL: define dso_local noundef float @test_erfinvf(1554// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1555// APPROX-NEXT: [[ENTRY:.*:]]1556// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_erfinv_f32(float noundef [[X]]) #[[ATTR13]]1557// APPROX-NEXT: ret float [[CALL_I]]1558//1559// NCRDIV-LABEL: define dso_local noundef float @test_erfinvf(1560// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1561// NCRDIV-NEXT: [[ENTRY:.*:]]1562// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_erfinv_f32(float noundef [[X]]) #[[ATTR13]]1563// NCRDIV-NEXT: ret float [[CALL_I]]1564//1565// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_erfinvf(1566// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1567// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1568// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_erfinv_f32(float noundef [[X]]) #[[ATTR13]]1569// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1570//1571extern "C" __device__ float test_erfinvf(float x) {1572 return erfinvf(x);1573}1574 1575// DEFAULT-LABEL: define dso_local noundef double @test_erfinv(1576// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1577// DEFAULT-NEXT: [[ENTRY:.*:]]1578// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_erfinv_f64(double noundef [[X]]) #[[ATTR13]]1579// DEFAULT-NEXT: ret double [[CALL_I]]1580//1581// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_erfinv(1582// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1583// FINITEONLY-NEXT: [[ENTRY:.*:]]1584// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_erfinv_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1585// FINITEONLY-NEXT: ret double [[CALL_I]]1586//1587// APPROX-LABEL: define dso_local noundef double @test_erfinv(1588// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1589// APPROX-NEXT: [[ENTRY:.*:]]1590// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_erfinv_f64(double noundef [[X]]) #[[ATTR13]]1591// APPROX-NEXT: ret double [[CALL_I]]1592//1593// NCRDIV-LABEL: define dso_local noundef double @test_erfinv(1594// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1595// NCRDIV-NEXT: [[ENTRY:.*:]]1596// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_erfinv_f64(double noundef [[X]]) #[[ATTR13]]1597// NCRDIV-NEXT: ret double [[CALL_I]]1598//1599// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_erfinv(1600// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1601// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1602// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_erfinv_f64(double noundef [[X]]) #[[ATTR13]]1603// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1604//1605extern "C" __device__ double test_erfinv(double x) {1606 return erfinv(x);1607}1608 1609// DEFAULT-LABEL: define dso_local noundef float @test_exp10f(1610// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1611// DEFAULT-NEXT: [[ENTRY:.*:]]1612// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp10.f32(float [[X]])1613// DEFAULT-NEXT: ret float [[TMP0]]1614//1615// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_exp10f(1616// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1617// FINITEONLY-NEXT: [[ENTRY:.*:]]1618// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.exp10.f32(float nofpclass(nan inf) [[X]])1619// FINITEONLY-NEXT: ret float [[TMP0]]1620//1621// APPROX-LABEL: define dso_local noundef float @test_exp10f(1622// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1623// APPROX-NEXT: [[ENTRY:.*:]]1624// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp10.f32(float [[X]])1625// APPROX-NEXT: ret float [[TMP0]]1626//1627// NCRDIV-LABEL: define dso_local noundef float @test_exp10f(1628// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1629// NCRDIV-NEXT: [[ENTRY:.*:]]1630// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp10.f32(float [[X]])1631// NCRDIV-NEXT: ret float [[TMP0]]1632//1633// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_exp10f(1634// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1635// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1636// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.exp10.f32(float [[X]])1637// AMDGCNSPIRV-NEXT: ret float [[TMP0]]1638//1639extern "C" __device__ float test_exp10f(float x) {1640 return exp10f(x);1641}1642 1643// DEFAULT-LABEL: define dso_local noundef double @test_exp10(1644// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1645// DEFAULT-NEXT: [[ENTRY:.*:]]1646// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp10_f64(double noundef [[X]]) #[[ATTR13]]1647// DEFAULT-NEXT: ret double [[CALL_I]]1648//1649// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_exp10(1650// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1651// FINITEONLY-NEXT: [[ENTRY:.*:]]1652// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_exp10_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1653// FINITEONLY-NEXT: ret double [[CALL_I]]1654//1655// APPROX-LABEL: define dso_local noundef double @test_exp10(1656// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1657// APPROX-NEXT: [[ENTRY:.*:]]1658// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp10_f64(double noundef [[X]]) #[[ATTR13]]1659// APPROX-NEXT: ret double [[CALL_I]]1660//1661// NCRDIV-LABEL: define dso_local noundef double @test_exp10(1662// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1663// NCRDIV-NEXT: [[ENTRY:.*:]]1664// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp10_f64(double noundef [[X]]) #[[ATTR13]]1665// NCRDIV-NEXT: ret double [[CALL_I]]1666//1667// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_exp10(1668// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1669// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1670// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_exp10_f64(double noundef [[X]]) #[[ATTR13]]1671// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1672//1673extern "C" __device__ double test_exp10(double x) {1674 return exp10(x);1675}1676 1677// DEFAULT-LABEL: define dso_local noundef float @test_exp2f(1678// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1679// DEFAULT-NEXT: [[ENTRY:.*:]]1680// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp2.f32(float [[X]])1681// DEFAULT-NEXT: ret float [[TMP0]]1682//1683// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_exp2f(1684// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1685// FINITEONLY-NEXT: [[ENTRY:.*:]]1686// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.exp2.f32(float nofpclass(nan inf) [[X]])1687// FINITEONLY-NEXT: ret float [[TMP0]]1688//1689// APPROX-LABEL: define dso_local noundef float @test_exp2f(1690// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1691// APPROX-NEXT: [[ENTRY:.*:]]1692// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp2.f32(float [[X]])1693// APPROX-NEXT: ret float [[TMP0]]1694//1695// NCRDIV-LABEL: define dso_local noundef float @test_exp2f(1696// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1697// NCRDIV-NEXT: [[ENTRY:.*:]]1698// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp2.f32(float [[X]])1699// NCRDIV-NEXT: ret float [[TMP0]]1700//1701// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_exp2f(1702// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1703// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1704// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.exp2.f32(float [[X]])1705// AMDGCNSPIRV-NEXT: ret float [[TMP0]]1706//1707extern "C" __device__ float test_exp2f(float x) {1708 return exp2f(x);1709}1710 1711// DEFAULT-LABEL: define dso_local noundef double @test_exp2(1712// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1713// DEFAULT-NEXT: [[ENTRY:.*:]]1714// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp2_f64(double noundef [[X]]) #[[ATTR13]]1715// DEFAULT-NEXT: ret double [[CALL_I]]1716//1717// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_exp2(1718// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1719// FINITEONLY-NEXT: [[ENTRY:.*:]]1720// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_exp2_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1721// FINITEONLY-NEXT: ret double [[CALL_I]]1722//1723// APPROX-LABEL: define dso_local noundef double @test_exp2(1724// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1725// APPROX-NEXT: [[ENTRY:.*:]]1726// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp2_f64(double noundef [[X]]) #[[ATTR13]]1727// APPROX-NEXT: ret double [[CALL_I]]1728//1729// NCRDIV-LABEL: define dso_local noundef double @test_exp2(1730// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1731// NCRDIV-NEXT: [[ENTRY:.*:]]1732// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp2_f64(double noundef [[X]]) #[[ATTR13]]1733// NCRDIV-NEXT: ret double [[CALL_I]]1734//1735// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_exp2(1736// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1737// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1738// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_exp2_f64(double noundef [[X]]) #[[ATTR13]]1739// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1740//1741extern "C" __device__ double test_exp2(double x) {1742 return exp2(x);1743}1744 1745// DEFAULT-LABEL: define dso_local noundef float @test_expf(1746// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1747// DEFAULT-NEXT: [[ENTRY:.*:]]1748// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp.f32(float [[X]])1749// DEFAULT-NEXT: ret float [[TMP0]]1750//1751// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_expf(1752// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1753// FINITEONLY-NEXT: [[ENTRY:.*:]]1754// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.exp.f32(float nofpclass(nan inf) [[X]])1755// FINITEONLY-NEXT: ret float [[TMP0]]1756//1757// APPROX-LABEL: define dso_local noundef float @test_expf(1758// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1759// APPROX-NEXT: [[ENTRY:.*:]]1760// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp.f32(float [[X]])1761// APPROX-NEXT: ret float [[TMP0]]1762//1763// NCRDIV-LABEL: define dso_local noundef float @test_expf(1764// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1765// NCRDIV-NEXT: [[ENTRY:.*:]]1766// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.exp.f32(float [[X]])1767// NCRDIV-NEXT: ret float [[TMP0]]1768//1769// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_expf(1770// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1771// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1772// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.exp.f32(float [[X]])1773// AMDGCNSPIRV-NEXT: ret float [[TMP0]]1774//1775extern "C" __device__ float test_expf(float x) {1776 return expf(x);1777}1778 1779// DEFAULT-LABEL: define dso_local noundef double @test_exp(1780// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1781// DEFAULT-NEXT: [[ENTRY:.*:]]1782// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp_f64(double noundef [[X]]) #[[ATTR13]]1783// DEFAULT-NEXT: ret double [[CALL_I]]1784//1785// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_exp(1786// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1787// FINITEONLY-NEXT: [[ENTRY:.*:]]1788// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_exp_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1789// FINITEONLY-NEXT: ret double [[CALL_I]]1790//1791// APPROX-LABEL: define dso_local noundef double @test_exp(1792// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1793// APPROX-NEXT: [[ENTRY:.*:]]1794// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp_f64(double noundef [[X]]) #[[ATTR13]]1795// APPROX-NEXT: ret double [[CALL_I]]1796//1797// NCRDIV-LABEL: define dso_local noundef double @test_exp(1798// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1799// NCRDIV-NEXT: [[ENTRY:.*:]]1800// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_exp_f64(double noundef [[X]]) #[[ATTR13]]1801// NCRDIV-NEXT: ret double [[CALL_I]]1802//1803// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_exp(1804// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1805// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1806// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_exp_f64(double noundef [[X]]) #[[ATTR13]]1807// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1808//1809extern "C" __device__ double test_exp(double x) {1810 return exp(x);1811}1812 1813// DEFAULT-LABEL: define dso_local noundef float @test_expm1f(1814// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1815// DEFAULT-NEXT: [[ENTRY:.*:]]1816// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_expm1_f32(float noundef [[X]]) #[[ATTR13]]1817// DEFAULT-NEXT: ret float [[CALL_I]]1818//1819// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_expm1f(1820// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1821// FINITEONLY-NEXT: [[ENTRY:.*:]]1822// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_expm1_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1823// FINITEONLY-NEXT: ret float [[CALL_I]]1824//1825// APPROX-LABEL: define dso_local noundef float @test_expm1f(1826// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1827// APPROX-NEXT: [[ENTRY:.*:]]1828// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_expm1_f32(float noundef [[X]]) #[[ATTR13]]1829// APPROX-NEXT: ret float [[CALL_I]]1830//1831// NCRDIV-LABEL: define dso_local noundef float @test_expm1f(1832// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1833// NCRDIV-NEXT: [[ENTRY:.*:]]1834// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_expm1_f32(float noundef [[X]]) #[[ATTR13]]1835// NCRDIV-NEXT: ret float [[CALL_I]]1836//1837// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_expm1f(1838// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1839// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1840// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_expm1_f32(float noundef [[X]]) #[[ATTR13]]1841// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1842//1843extern "C" __device__ float test_expm1f(float x) {1844 return expm1f(x);1845}1846 1847// DEFAULT-LABEL: define dso_local noundef double @test_expm1(1848// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1849// DEFAULT-NEXT: [[ENTRY:.*:]]1850// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_expm1_f64(double noundef [[X]]) #[[ATTR13]]1851// DEFAULT-NEXT: ret double [[CALL_I]]1852//1853// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_expm1(1854// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1855// FINITEONLY-NEXT: [[ENTRY:.*:]]1856// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_expm1_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]1857// FINITEONLY-NEXT: ret double [[CALL_I]]1858//1859// APPROX-LABEL: define dso_local noundef double @test_expm1(1860// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1861// APPROX-NEXT: [[ENTRY:.*:]]1862// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_expm1_f64(double noundef [[X]]) #[[ATTR13]]1863// APPROX-NEXT: ret double [[CALL_I]]1864//1865// NCRDIV-LABEL: define dso_local noundef double @test_expm1(1866// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {1867// NCRDIV-NEXT: [[ENTRY:.*:]]1868// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_expm1_f64(double noundef [[X]]) #[[ATTR13]]1869// NCRDIV-NEXT: ret double [[CALL_I]]1870//1871// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_expm1(1872// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {1873// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1874// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_expm1_f64(double noundef [[X]]) #[[ATTR13]]1875// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]1876//1877extern "C" __device__ double test_expm1(double x) {1878 return expm1(x);1879}1880 1881// DEFAULT-LABEL: define dso_local noundef float @test_fabsf(1882// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1883// DEFAULT-NEXT: [[ENTRY:.*:]]1884// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fabs.f32(float [[X]])1885// DEFAULT-NEXT: ret float [[TMP0]]1886//1887// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_fabsf(1888// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1889// FINITEONLY-NEXT: [[ENTRY:.*:]]1890// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.fabs.f32(float nofpclass(nan inf) [[X]])1891// FINITEONLY-NEXT: ret float [[TMP0]]1892//1893// APPROX-LABEL: define dso_local noundef float @test_fabsf(1894// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1895// APPROX-NEXT: [[ENTRY:.*:]]1896// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fabs.f32(float [[X]])1897// APPROX-NEXT: ret float [[TMP0]]1898//1899// NCRDIV-LABEL: define dso_local noundef float @test_fabsf(1900// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1901// NCRDIV-NEXT: [[ENTRY:.*:]]1902// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fabs.f32(float [[X]])1903// NCRDIV-NEXT: ret float [[TMP0]]1904//1905// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fabsf(1906// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1907// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1908// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.fabs.f32(float [[X]])1909// AMDGCNSPIRV-NEXT: ret float [[TMP0]]1910//1911extern "C" __device__ float test_fabsf(float x) {1912 return fabsf(x);1913}1914 1915// DEFAULT-LABEL: define dso_local noundef double @test_fabs(1916// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1917// DEFAULT-NEXT: [[ENTRY:.*:]]1918// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fabs.f64(double [[X]])1919// DEFAULT-NEXT: ret double [[TMP0]]1920//1921// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fabs(1922// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1923// FINITEONLY-NEXT: [[ENTRY:.*:]]1924// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.fabs.f64(double nofpclass(nan inf) [[X]])1925// FINITEONLY-NEXT: ret double [[TMP0]]1926//1927// APPROX-LABEL: define dso_local noundef double @test_fabs(1928// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1929// APPROX-NEXT: [[ENTRY:.*:]]1930// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fabs.f64(double [[X]])1931// APPROX-NEXT: ret double [[TMP0]]1932//1933// NCRDIV-LABEL: define dso_local noundef double @test_fabs(1934// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {1935// NCRDIV-NEXT: [[ENTRY:.*:]]1936// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fabs.f64(double [[X]])1937// NCRDIV-NEXT: ret double [[TMP0]]1938//1939// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fabs(1940// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {1941// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1942// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.fabs.f64(double [[X]])1943// AMDGCNSPIRV-NEXT: ret double [[TMP0]]1944//1945extern "C" __device__ double test_fabs(double x) {1946 return fabs(x);1947}1948 1949// DEFAULT-LABEL: define dso_local noundef float @test_fdimf(1950// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1951// DEFAULT-NEXT: [[ENTRY:.*:]]1952// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_fdim_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]1953// DEFAULT-NEXT: ret float [[CALL_I]]1954//1955// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_fdimf(1956// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1957// FINITEONLY-NEXT: [[ENTRY:.*:]]1958// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_fdim_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]1959// FINITEONLY-NEXT: ret float [[CALL_I]]1960//1961// APPROX-LABEL: define dso_local noundef float @test_fdimf(1962// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1963// APPROX-NEXT: [[ENTRY:.*:]]1964// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_fdim_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]1965// APPROX-NEXT: ret float [[CALL_I]]1966//1967// NCRDIV-LABEL: define dso_local noundef float @test_fdimf(1968// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1969// NCRDIV-NEXT: [[ENTRY:.*:]]1970// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_fdim_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]1971// NCRDIV-NEXT: ret float [[CALL_I]]1972//1973// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fdimf(1974// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {1975// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]1976// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_fdim_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]1977// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]1978//1979extern "C" __device__ float test_fdimf(float x, float y) {1980 return fdimf(x, y);1981}1982 1983// DEFAULT-LABEL: define dso_local noundef double @test_fdim(1984// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1985// DEFAULT-NEXT: [[ENTRY:.*:]]1986// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_fdim_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]1987// DEFAULT-NEXT: ret double [[CALL_I]]1988//1989// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fdim(1990// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1991// FINITEONLY-NEXT: [[ENTRY:.*:]]1992// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_fdim_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]1993// FINITEONLY-NEXT: ret double [[CALL_I]]1994//1995// APPROX-LABEL: define dso_local noundef double @test_fdim(1996// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {1997// APPROX-NEXT: [[ENTRY:.*:]]1998// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_fdim_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]1999// APPROX-NEXT: ret double [[CALL_I]]2000//2001// NCRDIV-LABEL: define dso_local noundef double @test_fdim(2002// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2003// NCRDIV-NEXT: [[ENTRY:.*:]]2004// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_fdim_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2005// NCRDIV-NEXT: ret double [[CALL_I]]2006//2007// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fdim(2008// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2009// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2010// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_fdim_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2011// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]2012//2013extern "C" __device__ double test_fdim(double x, double y) {2014 return fdim(x, y);2015}2016 2017// DEFAULT-LABEL: define dso_local noundef float @test_fdividef(2018// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2019// DEFAULT-NEXT: [[ENTRY:.*:]]2020// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]]2021// DEFAULT-NEXT: ret float [[DIV_I]]2022//2023// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_fdividef(2024// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2025// FINITEONLY-NEXT: [[ENTRY:.*:]]2026// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract float [[X]], [[Y]]2027// FINITEONLY-NEXT: ret float [[DIV_I]]2028//2029// APPROX-LABEL: define dso_local noundef float @test_fdividef(2030// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2031// APPROX-NEXT: [[ENTRY:.*:]]2032// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]]2033// APPROX-NEXT: ret float [[DIV_I]]2034//2035// NCRDIV-LABEL: define dso_local noundef float @test_fdividef(2036// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2037// NCRDIV-NEXT: [[ENTRY:.*:]]2038// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]], !fpmath [[META14:![0-9]+]]2039// NCRDIV-NEXT: ret float [[DIV_I]]2040//2041// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fdividef(2042// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2043// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2044// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]]2045// AMDGCNSPIRV-NEXT: ret float [[DIV_I]]2046//2047extern "C" __device__ float test_fdividef(float x, float y) {2048 return fdividef(x, y);2049}2050 2051// DEFAULT-LABEL: define dso_local noundef float @test_floorf(2052// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2053// DEFAULT-NEXT: [[ENTRY:.*:]]2054// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.floor.f32(float [[X]])2055// DEFAULT-NEXT: ret float [[TMP0]]2056//2057// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_floorf(2058// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2059// FINITEONLY-NEXT: [[ENTRY:.*:]]2060// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.floor.f32(float nofpclass(nan inf) [[X]])2061// FINITEONLY-NEXT: ret float [[TMP0]]2062//2063// APPROX-LABEL: define dso_local noundef float @test_floorf(2064// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2065// APPROX-NEXT: [[ENTRY:.*:]]2066// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.floor.f32(float [[X]])2067// APPROX-NEXT: ret float [[TMP0]]2068//2069// NCRDIV-LABEL: define dso_local noundef float @test_floorf(2070// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2071// NCRDIV-NEXT: [[ENTRY:.*:]]2072// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.floor.f32(float [[X]])2073// NCRDIV-NEXT: ret float [[TMP0]]2074//2075// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_floorf(2076// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2077// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2078// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.floor.f32(float [[X]])2079// AMDGCNSPIRV-NEXT: ret float [[TMP0]]2080//2081extern "C" __device__ float test_floorf(float x) {2082 return floorf(x);2083}2084 2085// DEFAULT-LABEL: define dso_local noundef double @test_floor(2086// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2087// DEFAULT-NEXT: [[ENTRY:.*:]]2088// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.floor.f64(double [[X]])2089// DEFAULT-NEXT: ret double [[TMP0]]2090//2091// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_floor(2092// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2093// FINITEONLY-NEXT: [[ENTRY:.*:]]2094// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.floor.f64(double nofpclass(nan inf) [[X]])2095// FINITEONLY-NEXT: ret double [[TMP0]]2096//2097// APPROX-LABEL: define dso_local noundef double @test_floor(2098// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2099// APPROX-NEXT: [[ENTRY:.*:]]2100// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.floor.f64(double [[X]])2101// APPROX-NEXT: ret double [[TMP0]]2102//2103// NCRDIV-LABEL: define dso_local noundef double @test_floor(2104// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2105// NCRDIV-NEXT: [[ENTRY:.*:]]2106// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.floor.f64(double [[X]])2107// NCRDIV-NEXT: ret double [[TMP0]]2108//2109// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_floor(2110// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2111// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2112// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.floor.f64(double [[X]])2113// AMDGCNSPIRV-NEXT: ret double [[TMP0]]2114//2115extern "C" __device__ double test_floor(double x) {2116 return floor(x);2117}2118 2119// DEFAULT-LABEL: define dso_local noundef float @test_fmaf(2120// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2121// DEFAULT-NEXT: [[ENTRY:.*:]]2122// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])2123// DEFAULT-NEXT: ret float [[TMP0]]2124//2125// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_fmaf(2126// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], float noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2127// FINITEONLY-NEXT: [[ENTRY:.*:]]2128// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.fma.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]], float nofpclass(nan inf) [[Z]])2129// FINITEONLY-NEXT: ret float [[TMP0]]2130//2131// APPROX-LABEL: define dso_local noundef float @test_fmaf(2132// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2133// APPROX-NEXT: [[ENTRY:.*:]]2134// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])2135// APPROX-NEXT: ret float [[TMP0]]2136//2137// NCRDIV-LABEL: define dso_local noundef float @test_fmaf(2138// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2139// NCRDIV-NEXT: [[ENTRY:.*:]]2140// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])2141// NCRDIV-NEXT: ret float [[TMP0]]2142//2143// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fmaf(2144// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2145// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2146// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])2147// AMDGCNSPIRV-NEXT: ret float [[TMP0]]2148//2149extern "C" __device__ float test_fmaf(float x, float y, float z) {2150 return fmaf(x, y, z);2151}2152 2153// DEFAULT-LABEL: define dso_local noundef double @test_fma(2154// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2155// DEFAULT-NEXT: [[ENTRY:.*:]]2156// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2157// DEFAULT-NEXT: ret double [[TMP0]]2158//2159// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fma(2160// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2161// FINITEONLY-NEXT: [[ENTRY:.*:]]2162// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.fma.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]], double nofpclass(nan inf) [[Z]])2163// FINITEONLY-NEXT: ret double [[TMP0]]2164//2165// APPROX-LABEL: define dso_local noundef double @test_fma(2166// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2167// APPROX-NEXT: [[ENTRY:.*:]]2168// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2169// APPROX-NEXT: ret double [[TMP0]]2170//2171// NCRDIV-LABEL: define dso_local noundef double @test_fma(2172// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2173// NCRDIV-NEXT: [[ENTRY:.*:]]2174// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2175// NCRDIV-NEXT: ret double [[TMP0]]2176//2177// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fma(2178// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2179// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2180// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2181// AMDGCNSPIRV-NEXT: ret double [[TMP0]]2182//2183extern "C" __device__ double test_fma(double x, double y, double z) {2184 return fma(x, y, z);2185}2186 2187// DEFAULT-LABEL: define dso_local noundef double @test_fma_rn(2188// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2189// DEFAULT-NEXT: [[ENTRY:.*:]]2190// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2191// DEFAULT-NEXT: ret double [[TMP0]]2192//2193// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fma_rn(2194// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2195// FINITEONLY-NEXT: [[ENTRY:.*:]]2196// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.fma.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]], double nofpclass(nan inf) [[Z]])2197// FINITEONLY-NEXT: ret double [[TMP0]]2198//2199// APPROX-LABEL: define dso_local noundef double @test_fma_rn(2200// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2201// APPROX-NEXT: [[ENTRY:.*:]]2202// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2203// APPROX-NEXT: ret double [[TMP0]]2204//2205// NCRDIV-LABEL: define dso_local noundef double @test_fma_rn(2206// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {2207// NCRDIV-NEXT: [[ENTRY:.*:]]2208// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2209// NCRDIV-NEXT: ret double [[TMP0]]2210//2211// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fma_rn(2212// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2213// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2214// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])2215// AMDGCNSPIRV-NEXT: ret double [[TMP0]]2216//2217extern "C" __device__ double test_fma_rn(double x, double y, double z) {2218 return __fma_rn(x, y, z);2219}2220 2221// DEFAULT-LABEL: define dso_local noundef float @test_fmaxf(2222// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2223// DEFAULT-NEXT: [[ENTRY:.*:]]2224// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.maxnum.f32(float [[X]], float [[Y]])2225// DEFAULT-NEXT: ret float [[TMP0]]2226//2227// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_fmaxf(2228// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2229// FINITEONLY-NEXT: [[ENTRY:.*:]]2230// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.maxnum.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]])2231// FINITEONLY-NEXT: ret float [[TMP0]]2232//2233// APPROX-LABEL: define dso_local noundef float @test_fmaxf(2234// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2235// APPROX-NEXT: [[ENTRY:.*:]]2236// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.maxnum.f32(float [[X]], float [[Y]])2237// APPROX-NEXT: ret float [[TMP0]]2238//2239// NCRDIV-LABEL: define dso_local noundef float @test_fmaxf(2240// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2241// NCRDIV-NEXT: [[ENTRY:.*:]]2242// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.maxnum.f32(float [[X]], float [[Y]])2243// NCRDIV-NEXT: ret float [[TMP0]]2244//2245// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fmaxf(2246// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2247// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2248// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.maxnum.f32(float [[X]], float [[Y]])2249// AMDGCNSPIRV-NEXT: ret float [[TMP0]]2250//2251extern "C" __device__ float test_fmaxf(float x, float y) {2252 return fmaxf(x, y);2253}2254 2255// DEFAULT-LABEL: define dso_local noundef double @test_fmax(2256// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2257// DEFAULT-NEXT: [[ENTRY:.*:]]2258// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.maxnum.f64(double [[X]], double [[Y]])2259// DEFAULT-NEXT: ret double [[TMP0]]2260//2261// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fmax(2262// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2263// FINITEONLY-NEXT: [[ENTRY:.*:]]2264// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.maxnum.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]])2265// FINITEONLY-NEXT: ret double [[TMP0]]2266//2267// APPROX-LABEL: define dso_local noundef double @test_fmax(2268// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2269// APPROX-NEXT: [[ENTRY:.*:]]2270// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.maxnum.f64(double [[X]], double [[Y]])2271// APPROX-NEXT: ret double [[TMP0]]2272//2273// NCRDIV-LABEL: define dso_local noundef double @test_fmax(2274// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2275// NCRDIV-NEXT: [[ENTRY:.*:]]2276// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.maxnum.f64(double [[X]], double [[Y]])2277// NCRDIV-NEXT: ret double [[TMP0]]2278//2279// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fmax(2280// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2281// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2282// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.maxnum.f64(double [[X]], double [[Y]])2283// AMDGCNSPIRV-NEXT: ret double [[TMP0]]2284//2285extern "C" __device__ double test_fmax(double x, double y) {2286 return fmax(x, y);2287}2288 2289// DEFAULT-LABEL: define dso_local noundef float @test_fminf(2290// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2291// DEFAULT-NEXT: [[ENTRY:.*:]]2292// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.minnum.f32(float [[X]], float [[Y]])2293// DEFAULT-NEXT: ret float [[TMP0]]2294//2295// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_fminf(2296// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2297// FINITEONLY-NEXT: [[ENTRY:.*:]]2298// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.minnum.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]])2299// FINITEONLY-NEXT: ret float [[TMP0]]2300//2301// APPROX-LABEL: define dso_local noundef float @test_fminf(2302// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2303// APPROX-NEXT: [[ENTRY:.*:]]2304// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.minnum.f32(float [[X]], float [[Y]])2305// APPROX-NEXT: ret float [[TMP0]]2306//2307// NCRDIV-LABEL: define dso_local noundef float @test_fminf(2308// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2309// NCRDIV-NEXT: [[ENTRY:.*:]]2310// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.minnum.f32(float [[X]], float [[Y]])2311// NCRDIV-NEXT: ret float [[TMP0]]2312//2313// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fminf(2314// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2315// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2316// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.minnum.f32(float [[X]], float [[Y]])2317// AMDGCNSPIRV-NEXT: ret float [[TMP0]]2318//2319extern "C" __device__ float test_fminf(float x, float y) {2320 return fminf(x, y);2321}2322 2323// DEFAULT-LABEL: define dso_local noundef double @test_fmin(2324// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2325// DEFAULT-NEXT: [[ENTRY:.*:]]2326// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.minnum.f64(double [[X]], double [[Y]])2327// DEFAULT-NEXT: ret double [[TMP0]]2328//2329// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fmin(2330// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2331// FINITEONLY-NEXT: [[ENTRY:.*:]]2332// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.minnum.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]])2333// FINITEONLY-NEXT: ret double [[TMP0]]2334//2335// APPROX-LABEL: define dso_local noundef double @test_fmin(2336// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2337// APPROX-NEXT: [[ENTRY:.*:]]2338// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.minnum.f64(double [[X]], double [[Y]])2339// APPROX-NEXT: ret double [[TMP0]]2340//2341// NCRDIV-LABEL: define dso_local noundef double @test_fmin(2342// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {2343// NCRDIV-NEXT: [[ENTRY:.*:]]2344// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.minnum.f64(double [[X]], double [[Y]])2345// NCRDIV-NEXT: ret double [[TMP0]]2346//2347// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fmin(2348// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2349// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2350// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.minnum.f64(double [[X]], double [[Y]])2351// AMDGCNSPIRV-NEXT: ret double [[TMP0]]2352//2353extern "C" __device__ double test_fmin(double x, double y) {2354 return fmin(x, y);2355}2356 2357// DEFAULT-LABEL: define dso_local noundef float @test_fmodf(2358// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2359// DEFAULT-NEXT: [[ENTRY:.*:]]2360// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_fmod_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2361// DEFAULT-NEXT: ret float [[CALL_I]]2362//2363// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_fmodf(2364// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2365// FINITEONLY-NEXT: [[ENTRY:.*:]]2366// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_fmod_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]2367// FINITEONLY-NEXT: ret float [[CALL_I]]2368//2369// APPROX-LABEL: define dso_local noundef float @test_fmodf(2370// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2371// APPROX-NEXT: [[ENTRY:.*:]]2372// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_fmod_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2373// APPROX-NEXT: ret float [[CALL_I]]2374//2375// NCRDIV-LABEL: define dso_local noundef float @test_fmodf(2376// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2377// NCRDIV-NEXT: [[ENTRY:.*:]]2378// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_fmod_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2379// NCRDIV-NEXT: ret float [[CALL_I]]2380//2381// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_fmodf(2382// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2383// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2384// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_fmod_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2385// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]2386//2387extern "C" __device__ float test_fmodf(float x, float y) {2388 return fmodf(x, y);2389}2390 2391// DEFAULT-LABEL: define dso_local noundef double @test_fmod(2392// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2393// DEFAULT-NEXT: [[ENTRY:.*:]]2394// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_fmod_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2395// DEFAULT-NEXT: ret double [[CALL_I]]2396//2397// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_fmod(2398// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2399// FINITEONLY-NEXT: [[ENTRY:.*:]]2400// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_fmod_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]2401// FINITEONLY-NEXT: ret double [[CALL_I]]2402//2403// APPROX-LABEL: define dso_local noundef double @test_fmod(2404// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2405// APPROX-NEXT: [[ENTRY:.*:]]2406// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_fmod_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2407// APPROX-NEXT: ret double [[CALL_I]]2408//2409// NCRDIV-LABEL: define dso_local noundef double @test_fmod(2410// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2411// NCRDIV-NEXT: [[ENTRY:.*:]]2412// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_fmod_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2413// NCRDIV-NEXT: ret double [[CALL_I]]2414//2415// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_fmod(2416// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2417// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2418// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_fmod_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2419// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]2420//2421extern "C" __device__ double test_fmod(double x, double y) {2422 return fmod(x, y);2423}2424 2425// DEFAULT-LABEL: define dso_local noundef float @test_frexpf(2426// DEFAULT-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7:[0-9]+]] {2427// DEFAULT-NEXT: [[ENTRY:.*:]]2428// DEFAULT-NEXT: [[TMP0:%.*]] = tail call { float, i32 } @llvm.frexp.f32.i32(float [[X]])2429// DEFAULT-NEXT: [[TMP1:%.*]] = extractvalue { float, i32 } [[TMP0]], 12430// DEFAULT-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4:![0-9]+]]2431// DEFAULT-NEXT: [[TMP2:%.*]] = extractvalue { float, i32 } [[TMP0]], 02432// DEFAULT-NEXT: ret float [[TMP2]]2433//2434// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_frexpf(2435// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7:[0-9]+]] {2436// FINITEONLY-NEXT: [[ENTRY:.*:]]2437// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call { float, i32 } @llvm.frexp.f32.i32(float nofpclass(nan inf) [[X]])2438// FINITEONLY-NEXT: [[TMP1:%.*]] = extractvalue { float, i32 } [[TMP0]], 12439// FINITEONLY-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4:![0-9]+]]2440// FINITEONLY-NEXT: [[TMP2:%.*]] = extractvalue { float, i32 } [[TMP0]], 02441// FINITEONLY-NEXT: ret float [[TMP2]]2442//2443// APPROX-LABEL: define dso_local noundef float @test_frexpf(2444// APPROX-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7:[0-9]+]] {2445// APPROX-NEXT: [[ENTRY:.*:]]2446// APPROX-NEXT: [[TMP0:%.*]] = tail call { float, i32 } @llvm.frexp.f32.i32(float [[X]])2447// APPROX-NEXT: [[TMP1:%.*]] = extractvalue { float, i32 } [[TMP0]], 12448// APPROX-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4:![0-9]+]]2449// APPROX-NEXT: [[TMP2:%.*]] = extractvalue { float, i32 } [[TMP0]], 02450// APPROX-NEXT: ret float [[TMP2]]2451//2452// NCRDIV-LABEL: define dso_local noundef float @test_frexpf(2453// NCRDIV-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7:[0-9]+]] {2454// NCRDIV-NEXT: [[ENTRY:.*:]]2455// NCRDIV-NEXT: [[TMP0:%.*]] = tail call { float, i32 } @llvm.frexp.f32.i32(float [[X]])2456// NCRDIV-NEXT: [[TMP1:%.*]] = extractvalue { float, i32 } [[TMP0]], 12457// NCRDIV-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4:![0-9]+]]2458// NCRDIV-NEXT: [[TMP2:%.*]] = extractvalue { float, i32 } [[TMP0]], 02459// NCRDIV-NEXT: ret float [[TMP2]]2460//2461// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_frexpf(2462// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR7:[0-9]+]] {2463// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2464// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call addrspace(4) { float, i32 } @llvm.frexp.f32.i32(float [[X]])2465// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = extractvalue { float, i32 } [[TMP0]], 12466// AMDGCNSPIRV-NEXT: store i32 [[TMP1]], ptr addrspace(4) [[Y]], align 4, !tbaa [[INT_TBAA5:![0-9]+]]2467// AMDGCNSPIRV-NEXT: [[TMP2:%.*]] = extractvalue { float, i32 } [[TMP0]], 02468// AMDGCNSPIRV-NEXT: ret float [[TMP2]]2469//2470extern "C" __device__ float test_frexpf(float x, int* y) {2471 return frexpf(x, y);2472}2473 2474// DEFAULT-LABEL: define dso_local noundef double @test_frexp(2475// DEFAULT-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7]] {2476// DEFAULT-NEXT: [[ENTRY:.*:]]2477// DEFAULT-NEXT: [[TMP0:%.*]] = tail call { double, i32 } @llvm.frexp.f64.i32(double [[X]])2478// DEFAULT-NEXT: [[TMP1:%.*]] = extractvalue { double, i32 } [[TMP0]], 12479// DEFAULT-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4]]2480// DEFAULT-NEXT: [[TMP2:%.*]] = extractvalue { double, i32 } [[TMP0]], 02481// DEFAULT-NEXT: ret double [[TMP2]]2482//2483// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_frexp(2484// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7]] {2485// FINITEONLY-NEXT: [[ENTRY:.*:]]2486// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call { double, i32 } @llvm.frexp.f64.i32(double nofpclass(nan inf) [[X]])2487// FINITEONLY-NEXT: [[TMP1:%.*]] = extractvalue { double, i32 } [[TMP0]], 12488// FINITEONLY-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4]]2489// FINITEONLY-NEXT: [[TMP2:%.*]] = extractvalue { double, i32 } [[TMP0]], 02490// FINITEONLY-NEXT: ret double [[TMP2]]2491//2492// APPROX-LABEL: define dso_local noundef double @test_frexp(2493// APPROX-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7]] {2494// APPROX-NEXT: [[ENTRY:.*:]]2495// APPROX-NEXT: [[TMP0:%.*]] = tail call { double, i32 } @llvm.frexp.f64.i32(double [[X]])2496// APPROX-NEXT: [[TMP1:%.*]] = extractvalue { double, i32 } [[TMP0]], 12497// APPROX-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4]]2498// APPROX-NEXT: [[TMP2:%.*]] = extractvalue { double, i32 } [[TMP0]], 02499// APPROX-NEXT: ret double [[TMP2]]2500//2501// NCRDIV-LABEL: define dso_local noundef double @test_frexp(2502// NCRDIV-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR7]] {2503// NCRDIV-NEXT: [[ENTRY:.*:]]2504// NCRDIV-NEXT: [[TMP0:%.*]] = tail call { double, i32 } @llvm.frexp.f64.i32(double [[X]])2505// NCRDIV-NEXT: [[TMP1:%.*]] = extractvalue { double, i32 } [[TMP0]], 12506// NCRDIV-NEXT: store i32 [[TMP1]], ptr [[Y]], align 4, !tbaa [[INT_TBAA4]]2507// NCRDIV-NEXT: [[TMP2:%.*]] = extractvalue { double, i32 } [[TMP0]], 02508// NCRDIV-NEXT: ret double [[TMP2]]2509//2510// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_frexp(2511// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR7]] {2512// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2513// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call addrspace(4) { double, i32 } @llvm.frexp.f64.i32(double [[X]])2514// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = extractvalue { double, i32 } [[TMP0]], 12515// AMDGCNSPIRV-NEXT: store i32 [[TMP1]], ptr addrspace(4) [[Y]], align 4, !tbaa [[INT_TBAA5]]2516// AMDGCNSPIRV-NEXT: [[TMP2:%.*]] = extractvalue { double, i32 } [[TMP0]], 02517// AMDGCNSPIRV-NEXT: ret double [[TMP2]]2518//2519extern "C" __device__ double test_frexp(double x, int* y) {2520 return frexp(x, y);2521}2522 2523// DEFAULT-LABEL: define dso_local noundef float @test_hypotf(2524// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2525// DEFAULT-NEXT: [[ENTRY:.*:]]2526// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_hypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2527// DEFAULT-NEXT: ret float [[CALL_I]]2528//2529// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_hypotf(2530// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2531// FINITEONLY-NEXT: [[ENTRY:.*:]]2532// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_hypot_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]2533// FINITEONLY-NEXT: ret float [[CALL_I]]2534//2535// APPROX-LABEL: define dso_local noundef float @test_hypotf(2536// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2537// APPROX-NEXT: [[ENTRY:.*:]]2538// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_hypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2539// APPROX-NEXT: ret float [[CALL_I]]2540//2541// NCRDIV-LABEL: define dso_local noundef float @test_hypotf(2542// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2543// NCRDIV-NEXT: [[ENTRY:.*:]]2544// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_hypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2545// NCRDIV-NEXT: ret float [[CALL_I]]2546//2547// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_hypotf(2548// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2549// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2550// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_hypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]2551// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]2552//2553extern "C" __device__ float test_hypotf(float x, float y) {2554 return hypotf(x, y);2555}2556 2557// DEFAULT-LABEL: define dso_local noundef double @test_hypot(2558// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2559// DEFAULT-NEXT: [[ENTRY:.*:]]2560// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_hypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2561// DEFAULT-NEXT: ret double [[CALL_I]]2562//2563// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_hypot(2564// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2565// FINITEONLY-NEXT: [[ENTRY:.*:]]2566// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_hypot_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]2567// FINITEONLY-NEXT: ret double [[CALL_I]]2568//2569// APPROX-LABEL: define dso_local noundef double @test_hypot(2570// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2571// APPROX-NEXT: [[ENTRY:.*:]]2572// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_hypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2573// APPROX-NEXT: ret double [[CALL_I]]2574//2575// NCRDIV-LABEL: define dso_local noundef double @test_hypot(2576// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {2577// NCRDIV-NEXT: [[ENTRY:.*:]]2578// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_hypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2579// NCRDIV-NEXT: ret double [[CALL_I]]2580//2581// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_hypot(2582// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2583// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2584// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_hypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]2585// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]2586//2587extern "C" __device__ double test_hypot(double x, double y) {2588 return hypot(x, y);2589}2590 2591// DEFAULT-LABEL: define dso_local noundef i32 @test_ilogbf(2592// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2593// DEFAULT-NEXT: [[ENTRY:.*:]]2594// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f32(float noundef [[X]]) #[[ATTR12]]2595// DEFAULT-NEXT: ret i32 [[CALL_I]]2596//2597// FINITEONLY-LABEL: define dso_local noundef i32 @test_ilogbf(2598// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2599// FINITEONLY-NEXT: [[ENTRY:.*:]]2600// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]2601// FINITEONLY-NEXT: ret i32 [[CALL_I]]2602//2603// APPROX-LABEL: define dso_local noundef i32 @test_ilogbf(2604// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2605// APPROX-NEXT: [[ENTRY:.*:]]2606// APPROX-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f32(float noundef [[X]]) #[[ATTR12]]2607// APPROX-NEXT: ret i32 [[CALL_I]]2608//2609// NCRDIV-LABEL: define dso_local noundef i32 @test_ilogbf(2610// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2611// NCRDIV-NEXT: [[ENTRY:.*:]]2612// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f32(float noundef [[X]]) #[[ATTR12]]2613// NCRDIV-NEXT: ret i32 [[CALL_I]]2614//2615// AMDGCNSPIRV-LABEL: define spir_func noundef i32 @test_ilogbf(2616// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2617// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2618// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call spir_func noundef addrspace(4) i32 @__ocml_ilogb_f32(float noundef [[X]]) #[[ATTR12]]2619// AMDGCNSPIRV-NEXT: ret i32 [[CALL_I]]2620//2621extern "C" __device__ int test_ilogbf(float x) {2622 return ilogbf(x);2623}2624 2625// DEFAULT-LABEL: define dso_local noundef i32 @test_ilogb(2626// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2627// DEFAULT-NEXT: [[ENTRY:.*:]]2628// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f64(double noundef [[X]]) #[[ATTR12]]2629// DEFAULT-NEXT: ret i32 [[CALL_I]]2630//2631// FINITEONLY-LABEL: define dso_local noundef i32 @test_ilogb(2632// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2633// FINITEONLY-NEXT: [[ENTRY:.*:]]2634// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]2635// FINITEONLY-NEXT: ret i32 [[CALL_I]]2636//2637// APPROX-LABEL: define dso_local noundef i32 @test_ilogb(2638// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2639// APPROX-NEXT: [[ENTRY:.*:]]2640// APPROX-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f64(double noundef [[X]]) #[[ATTR12]]2641// APPROX-NEXT: ret i32 [[CALL_I]]2642//2643// NCRDIV-LABEL: define dso_local noundef i32 @test_ilogb(2644// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {2645// NCRDIV-NEXT: [[ENTRY:.*:]]2646// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call noundef i32 @__ocml_ilogb_f64(double noundef [[X]]) #[[ATTR12]]2647// NCRDIV-NEXT: ret i32 [[CALL_I]]2648//2649// AMDGCNSPIRV-LABEL: define spir_func noundef i32 @test_ilogb(2650// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {2651// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2652// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call spir_func noundef addrspace(4) i32 @__ocml_ilogb_f64(double noundef [[X]]) #[[ATTR12]]2653// AMDGCNSPIRV-NEXT: ret i32 [[CALL_I]]2654//2655extern "C" __device__ int test_ilogb(double x) {2656 return ilogb(x);2657}2658 2659// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___finitef(2660// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2661// DEFAULT-NEXT: [[ENTRY:.*:]]2662// DEFAULT-NEXT: [[TMP0:%.*]] = tail call float @llvm.fabs.f32(float [[X]])2663// DEFAULT-NEXT: [[TMP1:%.*]] = fcmp one float [[TMP0]], 0x7FF00000000000002664// DEFAULT-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322665// DEFAULT-NEXT: ret i32 [[CONV]]2666//2667// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___finitef(2668// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2669// FINITEONLY-NEXT: [[ENTRY:.*:]]2670// FINITEONLY-NEXT: ret i32 12671//2672// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___finitef(2673// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2674// APPROX-NEXT: [[ENTRY:.*:]]2675// APPROX-NEXT: [[TMP0:%.*]] = tail call float @llvm.fabs.f32(float [[X]])2676// APPROX-NEXT: [[TMP1:%.*]] = fcmp one float [[TMP0]], 0x7FF00000000000002677// APPROX-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322678// APPROX-NEXT: ret i32 [[CONV]]2679//2680// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___finitef(2681// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2682// NCRDIV-NEXT: [[ENTRY:.*:]]2683// NCRDIV-NEXT: [[TMP0:%.*]] = tail call float @llvm.fabs.f32(float [[X]])2684// NCRDIV-NEXT: [[TMP1:%.*]] = fcmp one float [[TMP0]], 0x7FF00000000000002685// NCRDIV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322686// NCRDIV-NEXT: ret i32 [[CONV]]2687//2688// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___finitef(2689// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2690// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2691// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call addrspace(4) float @llvm.fabs.f32(float [[X]])2692// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = fcmp one float [[TMP0]], 0x7FF00000000000002693// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322694// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]2695//2696extern "C" __device__ BOOL_TYPE test___finitef(float x) {2697 return __finitef(x);2698}2699 2700// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___finite(2701// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2702// DEFAULT-NEXT: [[ENTRY:.*:]]2703// DEFAULT-NEXT: [[TMP0:%.*]] = tail call double @llvm.fabs.f64(double [[X]])2704// DEFAULT-NEXT: [[TMP1:%.*]] = fcmp one double [[TMP0]], 0x7FF00000000000002705// DEFAULT-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322706// DEFAULT-NEXT: ret i32 [[CONV]]2707//2708// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___finite(2709// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2710// FINITEONLY-NEXT: [[ENTRY:.*:]]2711// FINITEONLY-NEXT: ret i32 12712//2713// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___finite(2714// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2715// APPROX-NEXT: [[ENTRY:.*:]]2716// APPROX-NEXT: [[TMP0:%.*]] = tail call double @llvm.fabs.f64(double [[X]])2717// APPROX-NEXT: [[TMP1:%.*]] = fcmp one double [[TMP0]], 0x7FF00000000000002718// APPROX-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322719// APPROX-NEXT: ret i32 [[CONV]]2720//2721// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___finite(2722// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2723// NCRDIV-NEXT: [[ENTRY:.*:]]2724// NCRDIV-NEXT: [[TMP0:%.*]] = tail call double @llvm.fabs.f64(double [[X]])2725// NCRDIV-NEXT: [[TMP1:%.*]] = fcmp one double [[TMP0]], 0x7FF00000000000002726// NCRDIV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322727// NCRDIV-NEXT: ret i32 [[CONV]]2728//2729// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___finite(2730// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2731// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2732// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call addrspace(4) double @llvm.fabs.f64(double [[X]])2733// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = fcmp one double [[TMP0]], 0x7FF00000000000002734// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322735// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]2736//2737extern "C" __device__ BOOL_TYPE test___finite(double x) {2738 return __finite(x);2739}2740 2741// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___isinff(2742// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2743// DEFAULT-NEXT: [[ENTRY:.*:]]2744// DEFAULT-NEXT: [[TMP0:%.*]] = tail call float @llvm.fabs.f32(float [[X]])2745// DEFAULT-NEXT: [[TMP1:%.*]] = fcmp oeq float [[TMP0]], 0x7FF00000000000002746// DEFAULT-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322747// DEFAULT-NEXT: ret i32 [[CONV]]2748//2749// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___isinff(2750// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2751// FINITEONLY-NEXT: [[ENTRY:.*:]]2752// FINITEONLY-NEXT: ret i32 02753//2754// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___isinff(2755// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2756// APPROX-NEXT: [[ENTRY:.*:]]2757// APPROX-NEXT: [[TMP0:%.*]] = tail call float @llvm.fabs.f32(float [[X]])2758// APPROX-NEXT: [[TMP1:%.*]] = fcmp oeq float [[TMP0]], 0x7FF00000000000002759// APPROX-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322760// APPROX-NEXT: ret i32 [[CONV]]2761//2762// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___isinff(2763// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2764// NCRDIV-NEXT: [[ENTRY:.*:]]2765// NCRDIV-NEXT: [[TMP0:%.*]] = tail call float @llvm.fabs.f32(float [[X]])2766// NCRDIV-NEXT: [[TMP1:%.*]] = fcmp oeq float [[TMP0]], 0x7FF00000000000002767// NCRDIV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322768// NCRDIV-NEXT: ret i32 [[CONV]]2769//2770// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___isinff(2771// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2772// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2773// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call addrspace(4) float @llvm.fabs.f32(float [[X]])2774// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = fcmp oeq float [[TMP0]], 0x7FF00000000000002775// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322776// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]2777//2778extern "C" __device__ BOOL_TYPE test___isinff(float x) {2779 return __isinff(x);2780}2781 2782// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___isinf(2783// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2784// DEFAULT-NEXT: [[ENTRY:.*:]]2785// DEFAULT-NEXT: [[TMP0:%.*]] = tail call double @llvm.fabs.f64(double [[X]])2786// DEFAULT-NEXT: [[TMP1:%.*]] = fcmp oeq double [[TMP0]], 0x7FF00000000000002787// DEFAULT-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322788// DEFAULT-NEXT: ret i32 [[CONV]]2789//2790// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___isinf(2791// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2792// FINITEONLY-NEXT: [[ENTRY:.*:]]2793// FINITEONLY-NEXT: ret i32 02794//2795// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___isinf(2796// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2797// APPROX-NEXT: [[ENTRY:.*:]]2798// APPROX-NEXT: [[TMP0:%.*]] = tail call double @llvm.fabs.f64(double [[X]])2799// APPROX-NEXT: [[TMP1:%.*]] = fcmp oeq double [[TMP0]], 0x7FF00000000000002800// APPROX-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322801// APPROX-NEXT: ret i32 [[CONV]]2802//2803// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___isinf(2804// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2805// NCRDIV-NEXT: [[ENTRY:.*:]]2806// NCRDIV-NEXT: [[TMP0:%.*]] = tail call double @llvm.fabs.f64(double [[X]])2807// NCRDIV-NEXT: [[TMP1:%.*]] = fcmp oeq double [[TMP0]], 0x7FF00000000000002808// NCRDIV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322809// NCRDIV-NEXT: ret i32 [[CONV]]2810//2811// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___isinf(2812// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2813// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2814// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call addrspace(4) double @llvm.fabs.f64(double [[X]])2815// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = fcmp oeq double [[TMP0]], 0x7FF00000000000002816// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = zext i1 [[TMP1]] to i322817// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]2818//2819extern "C" __device__ BOOL_TYPE test___isinf(double x) {2820 return __isinf(x);2821}2822 2823// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___isnanf(2824// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2825// DEFAULT-NEXT: [[ENTRY:.*:]]2826// DEFAULT-NEXT: [[TMP0:%.*]] = fcmp uno float [[X]], 0.000000e+002827// DEFAULT-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322828// DEFAULT-NEXT: ret i32 [[CONV]]2829//2830// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___isnanf(2831// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2832// FINITEONLY-NEXT: [[ENTRY:.*:]]2833// FINITEONLY-NEXT: ret i32 02834//2835// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___isnanf(2836// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2837// APPROX-NEXT: [[ENTRY:.*:]]2838// APPROX-NEXT: [[TMP0:%.*]] = fcmp uno float [[X]], 0.000000e+002839// APPROX-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322840// APPROX-NEXT: ret i32 [[CONV]]2841//2842// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___isnanf(2843// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2844// NCRDIV-NEXT: [[ENTRY:.*:]]2845// NCRDIV-NEXT: [[TMP0:%.*]] = fcmp uno float [[X]], 0.000000e+002846// NCRDIV-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322847// NCRDIV-NEXT: ret i32 [[CONV]]2848//2849// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___isnanf(2850// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2851// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2852// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = fcmp uno float [[X]], 0.000000e+002853// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322854// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]2855//2856extern "C" __device__ BOOL_TYPE test___isnanf(float x) {2857 return __isnanf(x);2858}2859 2860// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___isnan(2861// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2862// DEFAULT-NEXT: [[ENTRY:.*:]]2863// DEFAULT-NEXT: [[TMP0:%.*]] = fcmp uno double [[X]], 0.000000e+002864// DEFAULT-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322865// DEFAULT-NEXT: ret i32 [[CONV]]2866//2867// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___isnan(2868// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2869// FINITEONLY-NEXT: [[ENTRY:.*:]]2870// FINITEONLY-NEXT: ret i32 02871//2872// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___isnan(2873// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2874// APPROX-NEXT: [[ENTRY:.*:]]2875// APPROX-NEXT: [[TMP0:%.*]] = fcmp uno double [[X]], 0.000000e+002876// APPROX-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322877// APPROX-NEXT: ret i32 [[CONV]]2878//2879// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___isnan(2880// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {2881// NCRDIV-NEXT: [[ENTRY:.*:]]2882// NCRDIV-NEXT: [[TMP0:%.*]] = fcmp uno double [[X]], 0.000000e+002883// NCRDIV-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322884// NCRDIV-NEXT: ret i32 [[CONV]]2885//2886// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___isnan(2887// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {2888// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2889// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = fcmp uno double [[X]], 0.000000e+002890// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = zext i1 [[TMP0]] to i322891// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]2892//2893extern "C" __device__ BOOL_TYPE test___isnan(double x) {2894 return __isnan(x);2895}2896 2897// DEFAULT-LABEL: define dso_local noundef float @test_j0f(2898// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2899// DEFAULT-NEXT: [[ENTRY:.*:]]2900// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[X]]) #[[ATTR14]]2901// DEFAULT-NEXT: ret float [[CALL_I]]2902//2903// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_j0f(2904// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2905// FINITEONLY-NEXT: [[ENTRY:.*:]]2906// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_j0_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]2907// FINITEONLY-NEXT: ret float [[CALL_I]]2908//2909// APPROX-LABEL: define dso_local noundef float @test_j0f(2910// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2911// APPROX-NEXT: [[ENTRY:.*:]]2912// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[X]]) #[[ATTR14]]2913// APPROX-NEXT: ret float [[CALL_I]]2914//2915// NCRDIV-LABEL: define dso_local noundef float @test_j0f(2916// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2917// NCRDIV-NEXT: [[ENTRY:.*:]]2918// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[X]]) #[[ATTR14]]2919// NCRDIV-NEXT: ret float [[CALL_I]]2920//2921// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_j0f(2922// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {2923// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2924// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_j0_f32(float noundef [[X]]) #[[ATTR14]]2925// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]2926//2927extern "C" __device__ float test_j0f(float x) {2928 return j0f(x);2929}2930 2931// DEFAULT-LABEL: define dso_local noundef double @test_j0(2932// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2933// DEFAULT-NEXT: [[ENTRY:.*:]]2934// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[X]]) #[[ATTR14]]2935// DEFAULT-NEXT: ret double [[CALL_I]]2936//2937// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_j0(2938// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2939// FINITEONLY-NEXT: [[ENTRY:.*:]]2940// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_j0_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]2941// FINITEONLY-NEXT: ret double [[CALL_I]]2942//2943// APPROX-LABEL: define dso_local noundef double @test_j0(2944// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2945// APPROX-NEXT: [[ENTRY:.*:]]2946// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[X]]) #[[ATTR14]]2947// APPROX-NEXT: ret double [[CALL_I]]2948//2949// NCRDIV-LABEL: define dso_local noundef double @test_j0(2950// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2951// NCRDIV-NEXT: [[ENTRY:.*:]]2952// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[X]]) #[[ATTR14]]2953// NCRDIV-NEXT: ret double [[CALL_I]]2954//2955// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_j0(2956// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {2957// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2958// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_j0_f64(double noundef [[X]]) #[[ATTR14]]2959// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]2960//2961extern "C" __device__ double test_j0(double x) {2962 return j0(x);2963}2964 2965// DEFAULT-LABEL: define dso_local noundef float @test_j1f(2966// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2967// DEFAULT-NEXT: [[ENTRY:.*:]]2968// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[X]]) #[[ATTR14]]2969// DEFAULT-NEXT: ret float [[CALL_I]]2970//2971// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_j1f(2972// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2973// FINITEONLY-NEXT: [[ENTRY:.*:]]2974// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_j1_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]2975// FINITEONLY-NEXT: ret float [[CALL_I]]2976//2977// APPROX-LABEL: define dso_local noundef float @test_j1f(2978// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2979// APPROX-NEXT: [[ENTRY:.*:]]2980// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[X]]) #[[ATTR14]]2981// APPROX-NEXT: ret float [[CALL_I]]2982//2983// NCRDIV-LABEL: define dso_local noundef float @test_j1f(2984// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {2985// NCRDIV-NEXT: [[ENTRY:.*:]]2986// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[X]]) #[[ATTR14]]2987// NCRDIV-NEXT: ret float [[CALL_I]]2988//2989// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_j1f(2990// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {2991// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]2992// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_j1_f32(float noundef [[X]]) #[[ATTR14]]2993// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]2994//2995extern "C" __device__ float test_j1f(float x) {2996 return j1f(x);2997}2998 2999// DEFAULT-LABEL: define dso_local noundef double @test_j1(3000// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3001// DEFAULT-NEXT: [[ENTRY:.*:]]3002// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[X]]) #[[ATTR14]]3003// DEFAULT-NEXT: ret double [[CALL_I]]3004//3005// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_j1(3006// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3007// FINITEONLY-NEXT: [[ENTRY:.*:]]3008// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_j1_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]3009// FINITEONLY-NEXT: ret double [[CALL_I]]3010//3011// APPROX-LABEL: define dso_local noundef double @test_j1(3012// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3013// APPROX-NEXT: [[ENTRY:.*:]]3014// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[X]]) #[[ATTR14]]3015// APPROX-NEXT: ret double [[CALL_I]]3016//3017// NCRDIV-LABEL: define dso_local noundef double @test_j1(3018// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3019// NCRDIV-NEXT: [[ENTRY:.*:]]3020// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[X]]) #[[ATTR14]]3021// NCRDIV-NEXT: ret double [[CALL_I]]3022//3023// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_j1(3024// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {3025// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3026// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_j1_f64(double noundef [[X]]) #[[ATTR14]]3027// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]3028//3029extern "C" __device__ double test_j1(double x) {3030 return j1(x);3031}3032 3033// DEFAULT-LABEL: define dso_local float @test_jnf(3034// DEFAULT-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3035// DEFAULT-NEXT: [[ENTRY:.*:]]3036// DEFAULT-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3037// DEFAULT-NEXT: i32 0, label %[[IF_THEN_I:.*]]3038// DEFAULT-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3039// DEFAULT-NEXT: ]3040// DEFAULT: [[IF_THEN_I]]:3041// DEFAULT-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3042// DEFAULT-NEXT: br label %[[_ZL3JNFIF_EXIT:.*]]3043// DEFAULT: [[IF_THEN2_I]]:3044// DEFAULT-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3045// DEFAULT-NEXT: br label %[[_ZL3JNFIF_EXIT]]3046// DEFAULT: [[IF_END4_I]]:3047// DEFAULT-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3048// DEFAULT-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3049// DEFAULT-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13050// DEFAULT-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3JNFIF_EXIT]]3051// DEFAULT: [[FOR_BODY_I]]:3052// DEFAULT-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3053// DEFAULT-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3054// DEFAULT-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3055// DEFAULT-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13056// DEFAULT-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float3057// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]]3058// DEFAULT-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]3059// DEFAULT-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]3060// DEFAULT-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13061// DEFAULT-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3062// DEFAULT-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3JNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP14:![0-9]+]]3063// DEFAULT: [[_ZL3JNFIF_EXIT]]:3064// DEFAULT-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3065// DEFAULT-NEXT: ret float [[RETVAL_0_I]]3066//3067// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_jnf(3068// FINITEONLY-SAME: i32 noundef [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3069// FINITEONLY-NEXT: [[ENTRY:.*:]]3070// FINITEONLY-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3071// FINITEONLY-NEXT: i32 0, label %[[IF_THEN_I:.*]]3072// FINITEONLY-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3073// FINITEONLY-NEXT: ]3074// FINITEONLY: [[IF_THEN_I]]:3075// FINITEONLY-NEXT: [[CALL_I20_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_j0_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3076// FINITEONLY-NEXT: br label %[[_ZL3JNFIF_EXIT:.*]]3077// FINITEONLY: [[IF_THEN2_I]]:3078// FINITEONLY-NEXT: [[CALL_I22_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_j1_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3079// FINITEONLY-NEXT: br label %[[_ZL3JNFIF_EXIT]]3080// FINITEONLY: [[IF_END4_I]]:3081// FINITEONLY-NEXT: [[CALL_I_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_j0_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3082// FINITEONLY-NEXT: [[CALL_I21_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_j1_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3083// FINITEONLY-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13084// FINITEONLY-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3JNFIF_EXIT]]3085// FINITEONLY: [[FOR_BODY_I]]:3086// FINITEONLY-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3087// FINITEONLY-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3088// FINITEONLY-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3089// FINITEONLY-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13090// FINITEONLY-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float3091// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract float [[CONV_I]], [[Y]]3092// FINITEONLY-NEXT: [[MUL8_I:%.*]] = fmul nnan ninf contract float [[__X1_0_I3]], [[DIV_I]]3093// FINITEONLY-NEXT: [[SUB_I]] = fsub nnan ninf contract float [[MUL8_I]], [[__X0_0_I2]]3094// FINITEONLY-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13095// FINITEONLY-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3096// FINITEONLY-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3JNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP14:![0-9]+]]3097// FINITEONLY: [[_ZL3JNFIF_EXIT]]:3098// FINITEONLY-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3099// FINITEONLY-NEXT: ret float [[RETVAL_0_I]]3100//3101// APPROX-LABEL: define dso_local float @test_jnf(3102// APPROX-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3103// APPROX-NEXT: [[ENTRY:.*:]]3104// APPROX-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3105// APPROX-NEXT: i32 0, label %[[IF_THEN_I:.*]]3106// APPROX-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3107// APPROX-NEXT: ]3108// APPROX: [[IF_THEN_I]]:3109// APPROX-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3110// APPROX-NEXT: br label %[[_ZL3JNFIF_EXIT:.*]]3111// APPROX: [[IF_THEN2_I]]:3112// APPROX-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3113// APPROX-NEXT: br label %[[_ZL3JNFIF_EXIT]]3114// APPROX: [[IF_END4_I]]:3115// APPROX-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3116// APPROX-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3117// APPROX-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13118// APPROX-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3JNFIF_EXIT]]3119// APPROX: [[FOR_BODY_I]]:3120// APPROX-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3121// APPROX-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3122// APPROX-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3123// APPROX-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13124// APPROX-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float3125// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]]3126// APPROX-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]3127// APPROX-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]3128// APPROX-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13129// APPROX-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3130// APPROX-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3JNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP14:![0-9]+]]3131// APPROX: [[_ZL3JNFIF_EXIT]]:3132// APPROX-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3133// APPROX-NEXT: ret float [[RETVAL_0_I]]3134//3135// NCRDIV-LABEL: define dso_local float @test_jnf(3136// NCRDIV-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3137// NCRDIV-NEXT: [[ENTRY:.*:]]3138// NCRDIV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3139// NCRDIV-NEXT: i32 0, label %[[IF_THEN_I:.*]]3140// NCRDIV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3141// NCRDIV-NEXT: ]3142// NCRDIV: [[IF_THEN_I]]:3143// NCRDIV-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3144// NCRDIV-NEXT: br label %[[_ZL3JNFIF_EXIT:.*]]3145// NCRDIV: [[IF_THEN2_I]]:3146// NCRDIV-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3147// NCRDIV-NEXT: br label %[[_ZL3JNFIF_EXIT]]3148// NCRDIV: [[IF_END4_I]]:3149// NCRDIV-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3150// NCRDIV-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3151// NCRDIV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13152// NCRDIV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3JNFIF_EXIT]]3153// NCRDIV: [[FOR_BODY_I]]:3154// NCRDIV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3155// NCRDIV-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3156// NCRDIV-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3157// NCRDIV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13158// NCRDIV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float3159// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]], !fpmath [[META14]]3160// NCRDIV-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]3161// NCRDIV-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]3162// NCRDIV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13163// NCRDIV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3164// NCRDIV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3JNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP15:![0-9]+]]3165// NCRDIV: [[_ZL3JNFIF_EXIT]]:3166// NCRDIV-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3167// NCRDIV-NEXT: ret float [[RETVAL_0_I]]3168//3169// AMDGCNSPIRV-LABEL: define spir_func float @test_jnf(3170// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {3171// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3172// AMDGCNSPIRV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3173// AMDGCNSPIRV-NEXT: i32 0, label %[[IF_THEN_I:.*]]3174// AMDGCNSPIRV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3175// AMDGCNSPIRV-NEXT: ]3176// AMDGCNSPIRV: [[IF_THEN_I]]:3177// AMDGCNSPIRV-NEXT: [[CALL_I20_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3178// AMDGCNSPIRV-NEXT: br label %[[_ZL3JNFIF_EXIT:.*]]3179// AMDGCNSPIRV: [[IF_THEN2_I]]:3180// AMDGCNSPIRV-NEXT: [[CALL_I22_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3181// AMDGCNSPIRV-NEXT: br label %[[_ZL3JNFIF_EXIT]]3182// AMDGCNSPIRV: [[IF_END4_I]]:3183// AMDGCNSPIRV-NEXT: [[CALL_I_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_j0_f32(float noundef [[Y]]) #[[ATTR14]]3184// AMDGCNSPIRV-NEXT: [[CALL_I21_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_j1_f32(float noundef [[Y]]) #[[ATTR14]]3185// AMDGCNSPIRV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13186// AMDGCNSPIRV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3JNFIF_EXIT]]3187// AMDGCNSPIRV: [[FOR_BODY_I]]:3188// AMDGCNSPIRV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3189// AMDGCNSPIRV-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3190// AMDGCNSPIRV-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3191// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13192// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float3193// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]]3194// AMDGCNSPIRV-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]3195// AMDGCNSPIRV-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]3196// AMDGCNSPIRV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13197// AMDGCNSPIRV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3198// AMDGCNSPIRV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3JNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP15:![0-9]+]]3199// AMDGCNSPIRV: [[_ZL3JNFIF_EXIT]]:3200// AMDGCNSPIRV-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3201// AMDGCNSPIRV-NEXT: ret float [[RETVAL_0_I]]3202//3203extern "C" __device__ float test_jnf(int x, float y) {3204 return jnf(x, y);3205}3206 3207// DEFAULT-LABEL: define dso_local double @test_jn(3208// DEFAULT-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3209// DEFAULT-NEXT: [[ENTRY:.*:]]3210// DEFAULT-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3211// DEFAULT-NEXT: i32 0, label %[[IF_THEN_I:.*]]3212// DEFAULT-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3213// DEFAULT-NEXT: ]3214// DEFAULT: [[IF_THEN_I]]:3215// DEFAULT-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3216// DEFAULT-NEXT: br label %[[_ZL2JNID_EXIT:.*]]3217// DEFAULT: [[IF_THEN2_I]]:3218// DEFAULT-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3219// DEFAULT-NEXT: br label %[[_ZL2JNID_EXIT]]3220// DEFAULT: [[IF_END4_I]]:3221// DEFAULT-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3222// DEFAULT-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3223// DEFAULT-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13224// DEFAULT-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2JNID_EXIT]]3225// DEFAULT: [[FOR_BODY_I]]:3226// DEFAULT-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3227// DEFAULT-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3228// DEFAULT-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3229// DEFAULT-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13230// DEFAULT-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double3231// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]3232// DEFAULT-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]3233// DEFAULT-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]3234// DEFAULT-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13235// DEFAULT-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3236// DEFAULT-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2JNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP15:![0-9]+]]3237// DEFAULT: [[_ZL2JNID_EXIT]]:3238// DEFAULT-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3239// DEFAULT-NEXT: ret double [[RETVAL_0_I]]3240//3241// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test_jn(3242// FINITEONLY-SAME: i32 noundef [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3243// FINITEONLY-NEXT: [[ENTRY:.*:]]3244// FINITEONLY-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3245// FINITEONLY-NEXT: i32 0, label %[[IF_THEN_I:.*]]3246// FINITEONLY-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3247// FINITEONLY-NEXT: ]3248// FINITEONLY: [[IF_THEN_I]]:3249// FINITEONLY-NEXT: [[CALL_I20_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_j0_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3250// FINITEONLY-NEXT: br label %[[_ZL2JNID_EXIT:.*]]3251// FINITEONLY: [[IF_THEN2_I]]:3252// FINITEONLY-NEXT: [[CALL_I22_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_j1_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3253// FINITEONLY-NEXT: br label %[[_ZL2JNID_EXIT]]3254// FINITEONLY: [[IF_END4_I]]:3255// FINITEONLY-NEXT: [[CALL_I_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_j0_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3256// FINITEONLY-NEXT: [[CALL_I21_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_j1_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]3257// FINITEONLY-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13258// FINITEONLY-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2JNID_EXIT]]3259// FINITEONLY: [[FOR_BODY_I]]:3260// FINITEONLY-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3261// FINITEONLY-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3262// FINITEONLY-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3263// FINITEONLY-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13264// FINITEONLY-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double3265// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract double [[CONV_I]], [[Y]]3266// FINITEONLY-NEXT: [[MUL8_I:%.*]] = fmul nnan ninf contract double [[__X1_0_I3]], [[DIV_I]]3267// FINITEONLY-NEXT: [[SUB_I]] = fsub nnan ninf contract double [[MUL8_I]], [[__X0_0_I2]]3268// FINITEONLY-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13269// FINITEONLY-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3270// FINITEONLY-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2JNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP15:![0-9]+]]3271// FINITEONLY: [[_ZL2JNID_EXIT]]:3272// FINITEONLY-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3273// FINITEONLY-NEXT: ret double [[RETVAL_0_I]]3274//3275// APPROX-LABEL: define dso_local double @test_jn(3276// APPROX-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3277// APPROX-NEXT: [[ENTRY:.*:]]3278// APPROX-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3279// APPROX-NEXT: i32 0, label %[[IF_THEN_I:.*]]3280// APPROX-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3281// APPROX-NEXT: ]3282// APPROX: [[IF_THEN_I]]:3283// APPROX-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3284// APPROX-NEXT: br label %[[_ZL2JNID_EXIT:.*]]3285// APPROX: [[IF_THEN2_I]]:3286// APPROX-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3287// APPROX-NEXT: br label %[[_ZL2JNID_EXIT]]3288// APPROX: [[IF_END4_I]]:3289// APPROX-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3290// APPROX-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3291// APPROX-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13292// APPROX-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2JNID_EXIT]]3293// APPROX: [[FOR_BODY_I]]:3294// APPROX-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3295// APPROX-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3296// APPROX-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3297// APPROX-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13298// APPROX-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double3299// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]3300// APPROX-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]3301// APPROX-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]3302// APPROX-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13303// APPROX-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3304// APPROX-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2JNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP15:![0-9]+]]3305// APPROX: [[_ZL2JNID_EXIT]]:3306// APPROX-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3307// APPROX-NEXT: ret double [[RETVAL_0_I]]3308//3309// NCRDIV-LABEL: define dso_local double @test_jn(3310// NCRDIV-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {3311// NCRDIV-NEXT: [[ENTRY:.*:]]3312// NCRDIV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3313// NCRDIV-NEXT: i32 0, label %[[IF_THEN_I:.*]]3314// NCRDIV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3315// NCRDIV-NEXT: ]3316// NCRDIV: [[IF_THEN_I]]:3317// NCRDIV-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3318// NCRDIV-NEXT: br label %[[_ZL2JNID_EXIT:.*]]3319// NCRDIV: [[IF_THEN2_I]]:3320// NCRDIV-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3321// NCRDIV-NEXT: br label %[[_ZL2JNID_EXIT]]3322// NCRDIV: [[IF_END4_I]]:3323// NCRDIV-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3324// NCRDIV-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3325// NCRDIV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13326// NCRDIV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2JNID_EXIT]]3327// NCRDIV: [[FOR_BODY_I]]:3328// NCRDIV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3329// NCRDIV-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3330// NCRDIV-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3331// NCRDIV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13332// NCRDIV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double3333// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]3334// NCRDIV-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]3335// NCRDIV-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]3336// NCRDIV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13337// NCRDIV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3338// NCRDIV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2JNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP16:![0-9]+]]3339// NCRDIV: [[_ZL2JNID_EXIT]]:3340// NCRDIV-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3341// NCRDIV-NEXT: ret double [[RETVAL_0_I]]3342//3343// AMDGCNSPIRV-LABEL: define spir_func double @test_jn(3344// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {3345// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3346// AMDGCNSPIRV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [3347// AMDGCNSPIRV-NEXT: i32 0, label %[[IF_THEN_I:.*]]3348// AMDGCNSPIRV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]3349// AMDGCNSPIRV-NEXT: ]3350// AMDGCNSPIRV: [[IF_THEN_I]]:3351// AMDGCNSPIRV-NEXT: [[CALL_I20_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3352// AMDGCNSPIRV-NEXT: br label %[[_ZL2JNID_EXIT:.*]]3353// AMDGCNSPIRV: [[IF_THEN2_I]]:3354// AMDGCNSPIRV-NEXT: [[CALL_I22_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3355// AMDGCNSPIRV-NEXT: br label %[[_ZL2JNID_EXIT]]3356// AMDGCNSPIRV: [[IF_END4_I]]:3357// AMDGCNSPIRV-NEXT: [[CALL_I_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_j0_f64(double noundef [[Y]]) #[[ATTR14]]3358// AMDGCNSPIRV-NEXT: [[CALL_I21_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_j1_f64(double noundef [[Y]]) #[[ATTR14]]3359// AMDGCNSPIRV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 13360// AMDGCNSPIRV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2JNID_EXIT]]3361// AMDGCNSPIRV: [[FOR_BODY_I]]:3362// AMDGCNSPIRV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]3363// AMDGCNSPIRV-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]3364// AMDGCNSPIRV-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]3365// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 13366// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double3367// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]3368// AMDGCNSPIRV-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]3369// AMDGCNSPIRV-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]3370// AMDGCNSPIRV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 13371// AMDGCNSPIRV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]3372// AMDGCNSPIRV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2JNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP16:![0-9]+]]3373// AMDGCNSPIRV: [[_ZL2JNID_EXIT]]:3374// AMDGCNSPIRV-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]3375// AMDGCNSPIRV-NEXT: ret double [[RETVAL_0_I]]3376//3377extern "C" __device__ double test_jn(int x, double y) {3378 return jn(x, y);3379}3380 3381// DEFAULT-LABEL: define dso_local noundef float @test_ldexpf(3382// DEFAULT-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3383// DEFAULT-NEXT: [[ENTRY:.*:]]3384// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])3385// DEFAULT-NEXT: ret float [[TMP0]]3386//3387// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_ldexpf(3388// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3389// FINITEONLY-NEXT: [[ENTRY:.*:]]3390// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.ldexp.f32.i32(float nofpclass(nan inf) [[X]], i32 [[Y]])3391// FINITEONLY-NEXT: ret float [[TMP0]]3392//3393// APPROX-LABEL: define dso_local noundef float @test_ldexpf(3394// APPROX-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3395// APPROX-NEXT: [[ENTRY:.*:]]3396// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])3397// APPROX-NEXT: ret float [[TMP0]]3398//3399// NCRDIV-LABEL: define dso_local noundef float @test_ldexpf(3400// NCRDIV-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3401// NCRDIV-NEXT: [[ENTRY:.*:]]3402// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])3403// NCRDIV-NEXT: ret float [[TMP0]]3404//3405// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_ldexpf(3406// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3407// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3408// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])3409// AMDGCNSPIRV-NEXT: ret float [[TMP0]]3410//3411extern "C" __device__ float test_ldexpf(float x, int y) {3412 return ldexpf(x, y);3413}3414 3415// DEFAULT-LABEL: define dso_local noundef double @test_ldexp(3416// DEFAULT-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3417// DEFAULT-NEXT: [[ENTRY:.*:]]3418// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])3419// DEFAULT-NEXT: ret double [[TMP0]]3420//3421// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_ldexp(3422// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3423// FINITEONLY-NEXT: [[ENTRY:.*:]]3424// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.ldexp.f64.i32(double nofpclass(nan inf) [[X]], i32 [[Y]])3425// FINITEONLY-NEXT: ret double [[TMP0]]3426//3427// APPROX-LABEL: define dso_local noundef double @test_ldexp(3428// APPROX-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3429// APPROX-NEXT: [[ENTRY:.*:]]3430// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])3431// APPROX-NEXT: ret double [[TMP0]]3432//3433// NCRDIV-LABEL: define dso_local noundef double @test_ldexp(3434// NCRDIV-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {3435// NCRDIV-NEXT: [[ENTRY:.*:]]3436// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])3437// NCRDIV-NEXT: ret double [[TMP0]]3438//3439// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_ldexp(3440// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3441// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3442// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])3443// AMDGCNSPIRV-NEXT: ret double [[TMP0]]3444//3445extern "C" __device__ double test_ldexp(double x, int y) {3446 return ldexp(x, y);3447}3448 3449// DEFAULT-LABEL: define dso_local noundef float @test_lgammaf(3450// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3451// DEFAULT-NEXT: [[ENTRY:.*:]]3452// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_lgamma_f32(float noundef [[X]]) #[[ATTR14]]3453// DEFAULT-NEXT: ret float [[CALL_I]]3454//3455// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_lgammaf(3456// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3457// FINITEONLY-NEXT: [[ENTRY:.*:]]3458// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_lgamma_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]3459// FINITEONLY-NEXT: ret float [[CALL_I]]3460//3461// APPROX-LABEL: define dso_local noundef float @test_lgammaf(3462// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3463// APPROX-NEXT: [[ENTRY:.*:]]3464// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_lgamma_f32(float noundef [[X]]) #[[ATTR14]]3465// APPROX-NEXT: ret float [[CALL_I]]3466//3467// NCRDIV-LABEL: define dso_local noundef float @test_lgammaf(3468// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3469// NCRDIV-NEXT: [[ENTRY:.*:]]3470// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_lgamma_f32(float noundef [[X]]) #[[ATTR14]]3471// NCRDIV-NEXT: ret float [[CALL_I]]3472//3473// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_lgammaf(3474// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {3475// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3476// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_lgamma_f32(float noundef [[X]]) #[[ATTR14]]3477// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]3478//3479extern "C" __device__ float test_lgammaf(float x) {3480 return lgammaf(x);3481}3482 3483// DEFAULT-LABEL: define dso_local noundef double @test_lgamma(3484// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3485// DEFAULT-NEXT: [[ENTRY:.*:]]3486// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_lgamma_f64(double noundef [[X]]) #[[ATTR14]]3487// DEFAULT-NEXT: ret double [[CALL_I]]3488//3489// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_lgamma(3490// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3491// FINITEONLY-NEXT: [[ENTRY:.*:]]3492// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_lgamma_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]3493// FINITEONLY-NEXT: ret double [[CALL_I]]3494//3495// APPROX-LABEL: define dso_local noundef double @test_lgamma(3496// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3497// APPROX-NEXT: [[ENTRY:.*:]]3498// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_lgamma_f64(double noundef [[X]]) #[[ATTR14]]3499// APPROX-NEXT: ret double [[CALL_I]]3500//3501// NCRDIV-LABEL: define dso_local noundef double @test_lgamma(3502// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {3503// NCRDIV-NEXT: [[ENTRY:.*:]]3504// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_lgamma_f64(double noundef [[X]]) #[[ATTR14]]3505// NCRDIV-NEXT: ret double [[CALL_I]]3506//3507// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_lgamma(3508// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {3509// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3510// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_lgamma_f64(double noundef [[X]]) #[[ATTR14]]3511// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]3512//3513extern "C" __device__ double test_lgamma(double x) {3514 return lgamma(x);3515}3516 3517// DEFAULT-LABEL: define dso_local i64 @test_llrintf(3518// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3519// DEFAULT-NEXT: [[ENTRY:.*:]]3520// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.rint.f32(float [[X]])3521// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643522// DEFAULT-NEXT: ret i64 [[CONV_I]]3523//3524// FINITEONLY-LABEL: define dso_local i64 @test_llrintf(3525// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3526// FINITEONLY-NEXT: [[ENTRY:.*:]]3527// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract float @llvm.rint.f32(float nofpclass(nan inf) [[X]])3528// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643529// FINITEONLY-NEXT: ret i64 [[CONV_I]]3530//3531// APPROX-LABEL: define dso_local i64 @test_llrintf(3532// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3533// APPROX-NEXT: [[ENTRY:.*:]]3534// APPROX-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.rint.f32(float [[X]])3535// APPROX-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643536// APPROX-NEXT: ret i64 [[CONV_I]]3537//3538// NCRDIV-LABEL: define dso_local i64 @test_llrintf(3539// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3540// NCRDIV-NEXT: [[ENTRY:.*:]]3541// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.rint.f32(float [[X]])3542// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643543// NCRDIV-NEXT: ret i64 [[CONV_I]]3544//3545// AMDGCNSPIRV-LABEL: define spir_func i64 @test_llrintf(3546// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3547// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3548// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) float @llvm.rint.f32(float [[X]])3549// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643550// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]3551//3552extern "C" __device__ long long int test_llrintf(float x) {3553 return llrintf(x);3554}3555 3556// DEFAULT-LABEL: define dso_local i64 @test_llrint(3557// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3558// DEFAULT-NEXT: [[ENTRY:.*:]]3559// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.rint.f64(double [[X]])3560// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643561// DEFAULT-NEXT: ret i64 [[CONV_I]]3562//3563// FINITEONLY-LABEL: define dso_local i64 @test_llrint(3564// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3565// FINITEONLY-NEXT: [[ENTRY:.*:]]3566// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract double @llvm.rint.f64(double nofpclass(nan inf) [[X]])3567// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643568// FINITEONLY-NEXT: ret i64 [[CONV_I]]3569//3570// APPROX-LABEL: define dso_local i64 @test_llrint(3571// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3572// APPROX-NEXT: [[ENTRY:.*:]]3573// APPROX-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.rint.f64(double [[X]])3574// APPROX-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643575// APPROX-NEXT: ret i64 [[CONV_I]]3576//3577// NCRDIV-LABEL: define dso_local i64 @test_llrint(3578// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3579// NCRDIV-NEXT: [[ENTRY:.*:]]3580// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.rint.f64(double [[X]])3581// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643582// NCRDIV-NEXT: ret i64 [[CONV_I]]3583//3584// AMDGCNSPIRV-LABEL: define spir_func i64 @test_llrint(3585// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3586// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3587// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) double @llvm.rint.f64(double [[X]])3588// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643589// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]3590//3591extern "C" __device__ long long int test_llrint(double x) {3592 return llrint(x);3593}3594 3595// DEFAULT-LABEL: define dso_local i64 @test_llroundf(3596// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3597// DEFAULT-NEXT: [[ENTRY:.*:]]3598// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.round.f32(float [[X]])3599// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643600// DEFAULT-NEXT: ret i64 [[CONV_I]]3601//3602// FINITEONLY-LABEL: define dso_local i64 @test_llroundf(3603// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3604// FINITEONLY-NEXT: [[ENTRY:.*:]]3605// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract float @llvm.round.f32(float nofpclass(nan inf) [[X]])3606// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643607// FINITEONLY-NEXT: ret i64 [[CONV_I]]3608//3609// APPROX-LABEL: define dso_local i64 @test_llroundf(3610// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3611// APPROX-NEXT: [[ENTRY:.*:]]3612// APPROX-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.round.f32(float [[X]])3613// APPROX-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643614// APPROX-NEXT: ret i64 [[CONV_I]]3615//3616// NCRDIV-LABEL: define dso_local i64 @test_llroundf(3617// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3618// NCRDIV-NEXT: [[ENTRY:.*:]]3619// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.round.f32(float [[X]])3620// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643621// NCRDIV-NEXT: ret i64 [[CONV_I]]3622//3623// AMDGCNSPIRV-LABEL: define spir_func i64 @test_llroundf(3624// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3625// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3626// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) float @llvm.round.f32(float [[X]])3627// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643628// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]3629//3630extern "C" __device__ long long int test_llroundf(float x) {3631 return llroundf(x);3632}3633 3634// DEFAULT-LABEL: define dso_local i64 @test_llround(3635// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3636// DEFAULT-NEXT: [[ENTRY:.*:]]3637// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.round.f64(double [[X]])3638// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643639// DEFAULT-NEXT: ret i64 [[CONV_I]]3640//3641// FINITEONLY-LABEL: define dso_local i64 @test_llround(3642// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3643// FINITEONLY-NEXT: [[ENTRY:.*:]]3644// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract double @llvm.round.f64(double nofpclass(nan inf) [[X]])3645// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643646// FINITEONLY-NEXT: ret i64 [[CONV_I]]3647//3648// APPROX-LABEL: define dso_local i64 @test_llround(3649// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3650// APPROX-NEXT: [[ENTRY:.*:]]3651// APPROX-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.round.f64(double [[X]])3652// APPROX-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643653// APPROX-NEXT: ret i64 [[CONV_I]]3654//3655// NCRDIV-LABEL: define dso_local i64 @test_llround(3656// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3657// NCRDIV-NEXT: [[ENTRY:.*:]]3658// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.round.f64(double [[X]])3659// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643660// NCRDIV-NEXT: ret i64 [[CONV_I]]3661//3662// AMDGCNSPIRV-LABEL: define spir_func i64 @test_llround(3663// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3664// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3665// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) double @llvm.round.f64(double [[X]])3666// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i643667// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]3668//3669extern "C" __device__ long long int test_llround(double x) {3670 return llround(x);3671}3672 3673// DEFAULT-LABEL: define dso_local noundef float @test_log10f(3674// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3675// DEFAULT-NEXT: [[ENTRY:.*:]]3676// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log10.f32(float [[X]])3677// DEFAULT-NEXT: ret float [[TMP0]]3678//3679// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_log10f(3680// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3681// FINITEONLY-NEXT: [[ENTRY:.*:]]3682// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.log10.f32(float nofpclass(nan inf) [[X]])3683// FINITEONLY-NEXT: ret float [[TMP0]]3684//3685// APPROX-LABEL: define dso_local noundef float @test_log10f(3686// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3687// APPROX-NEXT: [[ENTRY:.*:]]3688// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log10.f32(float [[X]])3689// APPROX-NEXT: ret float [[TMP0]]3690//3691// NCRDIV-LABEL: define dso_local noundef float @test_log10f(3692// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3693// NCRDIV-NEXT: [[ENTRY:.*:]]3694// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log10.f32(float [[X]])3695// NCRDIV-NEXT: ret float [[TMP0]]3696//3697// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_log10f(3698// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3699// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3700// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.log10.f32(float [[X]])3701// AMDGCNSPIRV-NEXT: ret float [[TMP0]]3702//3703extern "C" __device__ float test_log10f(float x) {3704 return log10f(x);3705}3706 3707// DEFAULT-LABEL: define dso_local noundef double @test_log10(3708// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3709// DEFAULT-NEXT: [[ENTRY:.*:]]3710// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log10_f64(double noundef [[X]]) #[[ATTR13]]3711// DEFAULT-NEXT: ret double [[CALL_I]]3712//3713// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_log10(3714// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3715// FINITEONLY-NEXT: [[ENTRY:.*:]]3716// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_log10_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]3717// FINITEONLY-NEXT: ret double [[CALL_I]]3718//3719// APPROX-LABEL: define dso_local noundef double @test_log10(3720// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3721// APPROX-NEXT: [[ENTRY:.*:]]3722// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log10_f64(double noundef [[X]]) #[[ATTR13]]3723// APPROX-NEXT: ret double [[CALL_I]]3724//3725// NCRDIV-LABEL: define dso_local noundef double @test_log10(3726// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3727// NCRDIV-NEXT: [[ENTRY:.*:]]3728// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log10_f64(double noundef [[X]]) #[[ATTR13]]3729// NCRDIV-NEXT: ret double [[CALL_I]]3730//3731// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_log10(3732// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {3733// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3734// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_log10_f64(double noundef [[X]]) #[[ATTR13]]3735// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]3736//3737extern "C" __device__ double test_log10(double x) {3738 return log10(x);3739}3740 3741// DEFAULT-LABEL: define dso_local noundef float @test_log1pf(3742// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3743// DEFAULT-NEXT: [[ENTRY:.*:]]3744// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_log1p_f32(float noundef [[X]]) #[[ATTR13]]3745// DEFAULT-NEXT: ret float [[CALL_I]]3746//3747// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_log1pf(3748// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3749// FINITEONLY-NEXT: [[ENTRY:.*:]]3750// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_log1p_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]3751// FINITEONLY-NEXT: ret float [[CALL_I]]3752//3753// APPROX-LABEL: define dso_local noundef float @test_log1pf(3754// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3755// APPROX-NEXT: [[ENTRY:.*:]]3756// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_log1p_f32(float noundef [[X]]) #[[ATTR13]]3757// APPROX-NEXT: ret float [[CALL_I]]3758//3759// NCRDIV-LABEL: define dso_local noundef float @test_log1pf(3760// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3761// NCRDIV-NEXT: [[ENTRY:.*:]]3762// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_log1p_f32(float noundef [[X]]) #[[ATTR13]]3763// NCRDIV-NEXT: ret float [[CALL_I]]3764//3765// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_log1pf(3766// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {3767// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3768// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_log1p_f32(float noundef [[X]]) #[[ATTR13]]3769// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]3770//3771extern "C" __device__ float test_log1pf(float x) {3772 return log1pf(x);3773}3774 3775// DEFAULT-LABEL: define dso_local noundef double @test_log1p(3776// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3777// DEFAULT-NEXT: [[ENTRY:.*:]]3778// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log1p_f64(double noundef [[X]]) #[[ATTR13]]3779// DEFAULT-NEXT: ret double [[CALL_I]]3780//3781// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_log1p(3782// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3783// FINITEONLY-NEXT: [[ENTRY:.*:]]3784// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_log1p_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]3785// FINITEONLY-NEXT: ret double [[CALL_I]]3786//3787// APPROX-LABEL: define dso_local noundef double @test_log1p(3788// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3789// APPROX-NEXT: [[ENTRY:.*:]]3790// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log1p_f64(double noundef [[X]]) #[[ATTR13]]3791// APPROX-NEXT: ret double [[CALL_I]]3792//3793// NCRDIV-LABEL: define dso_local noundef double @test_log1p(3794// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3795// NCRDIV-NEXT: [[ENTRY:.*:]]3796// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log1p_f64(double noundef [[X]]) #[[ATTR13]]3797// NCRDIV-NEXT: ret double [[CALL_I]]3798//3799// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_log1p(3800// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {3801// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3802// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_log1p_f64(double noundef [[X]]) #[[ATTR13]]3803// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]3804//3805extern "C" __device__ double test_log1p(double x) {3806 return log1p(x);3807}3808 3809// DEFAULT-LABEL: define dso_local noundef float @test_log2f(3810// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3811// DEFAULT-NEXT: [[ENTRY:.*:]]3812// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log2.f32(float [[X]])3813// DEFAULT-NEXT: ret float [[TMP0]]3814//3815// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_log2f(3816// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3817// FINITEONLY-NEXT: [[ENTRY:.*:]]3818// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.log2.f32(float nofpclass(nan inf) [[X]])3819// FINITEONLY-NEXT: ret float [[TMP0]]3820//3821// APPROX-LABEL: define dso_local noundef float @test_log2f(3822// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3823// APPROX-NEXT: [[ENTRY:.*:]]3824// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.log.f32(float [[X]])3825// APPROX-NEXT: ret float [[TMP0]]3826//3827// NCRDIV-LABEL: define dso_local noundef float @test_log2f(3828// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3829// NCRDIV-NEXT: [[ENTRY:.*:]]3830// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log2.f32(float [[X]])3831// NCRDIV-NEXT: ret float [[TMP0]]3832//3833// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_log2f(3834// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3835// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3836// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.log2.f32(float [[X]])3837// AMDGCNSPIRV-NEXT: ret float [[TMP0]]3838//3839extern "C" __device__ float test_log2f(float x) {3840 return log2f(x);3841}3842 3843// DEFAULT-LABEL: define dso_local noundef double @test_log2(3844// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3845// DEFAULT-NEXT: [[ENTRY:.*:]]3846// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log2_f64(double noundef [[X]]) #[[ATTR13]]3847// DEFAULT-NEXT: ret double [[CALL_I]]3848//3849// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_log2(3850// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3851// FINITEONLY-NEXT: [[ENTRY:.*:]]3852// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_log2_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]3853// FINITEONLY-NEXT: ret double [[CALL_I]]3854//3855// APPROX-LABEL: define dso_local noundef double @test_log2(3856// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3857// APPROX-NEXT: [[ENTRY:.*:]]3858// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log2_f64(double noundef [[X]]) #[[ATTR13]]3859// APPROX-NEXT: ret double [[CALL_I]]3860//3861// NCRDIV-LABEL: define dso_local noundef double @test_log2(3862// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {3863// NCRDIV-NEXT: [[ENTRY:.*:]]3864// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_log2_f64(double noundef [[X]]) #[[ATTR13]]3865// NCRDIV-NEXT: ret double [[CALL_I]]3866//3867// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_log2(3868// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {3869// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3870// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_log2_f64(double noundef [[X]]) #[[ATTR13]]3871// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]3872//3873extern "C" __device__ double test_log2(double x) {3874 return log2(x);3875}3876 3877// DEFAULT-LABEL: define dso_local noundef float @test_logbf(3878// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3879// DEFAULT-NEXT: [[ENTRY:.*:]]3880// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_logb_f32(float noundef [[X]]) #[[ATTR12]]3881// DEFAULT-NEXT: ret float [[CALL_I]]3882//3883// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_logbf(3884// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3885// FINITEONLY-NEXT: [[ENTRY:.*:]]3886// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_logb_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]3887// FINITEONLY-NEXT: ret float [[CALL_I]]3888//3889// APPROX-LABEL: define dso_local noundef float @test_logbf(3890// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3891// APPROX-NEXT: [[ENTRY:.*:]]3892// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_logb_f32(float noundef [[X]]) #[[ATTR12]]3893// APPROX-NEXT: ret float [[CALL_I]]3894//3895// NCRDIV-LABEL: define dso_local noundef float @test_logbf(3896// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3897// NCRDIV-NEXT: [[ENTRY:.*:]]3898// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_logb_f32(float noundef [[X]]) #[[ATTR12]]3899// NCRDIV-NEXT: ret float [[CALL_I]]3900//3901// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_logbf(3902// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {3903// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3904// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_logb_f32(float noundef [[X]]) #[[ATTR12]]3905// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]3906//3907extern "C" __device__ float test_logbf(float x) {3908 return logbf(x);3909}3910 3911// DEFAULT-LABEL: define dso_local noundef double @test_logb(3912// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3913// DEFAULT-NEXT: [[ENTRY:.*:]]3914// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_logb_f64(double noundef [[X]]) #[[ATTR12]]3915// DEFAULT-NEXT: ret double [[CALL_I]]3916//3917// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_logb(3918// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3919// FINITEONLY-NEXT: [[ENTRY:.*:]]3920// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_logb_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]3921// FINITEONLY-NEXT: ret double [[CALL_I]]3922//3923// APPROX-LABEL: define dso_local noundef double @test_logb(3924// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3925// APPROX-NEXT: [[ENTRY:.*:]]3926// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_logb_f64(double noundef [[X]]) #[[ATTR12]]3927// APPROX-NEXT: ret double [[CALL_I]]3928//3929// NCRDIV-LABEL: define dso_local noundef double @test_logb(3930// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {3931// NCRDIV-NEXT: [[ENTRY:.*:]]3932// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_logb_f64(double noundef [[X]]) #[[ATTR12]]3933// NCRDIV-NEXT: ret double [[CALL_I]]3934//3935// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_logb(3936// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {3937// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3938// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_logb_f64(double noundef [[X]]) #[[ATTR12]]3939// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]3940//3941extern "C" __device__ double test_logb(double x) {3942 return logb(x);3943}3944 3945// DEFAULT-LABEL: define dso_local noundef float @test_logf(3946// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3947// DEFAULT-NEXT: [[ENTRY:.*:]]3948// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log.f32(float [[X]])3949// DEFAULT-NEXT: ret float [[TMP0]]3950//3951// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_logf(3952// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3953// FINITEONLY-NEXT: [[ENTRY:.*:]]3954// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.log.f32(float nofpclass(nan inf) [[X]])3955// FINITEONLY-NEXT: ret float [[TMP0]]3956//3957// APPROX-LABEL: define dso_local noundef float @test_logf(3958// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3959// APPROX-NEXT: [[ENTRY:.*:]]3960// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log.f32(float [[X]])3961// APPROX-NEXT: ret float [[TMP0]]3962//3963// NCRDIV-LABEL: define dso_local noundef float @test_logf(3964// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3965// NCRDIV-NEXT: [[ENTRY:.*:]]3966// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log.f32(float [[X]])3967// NCRDIV-NEXT: ret float [[TMP0]]3968//3969// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_logf(3970// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {3971// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]3972// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.log.f32(float [[X]])3973// AMDGCNSPIRV-NEXT: ret float [[TMP0]]3974//3975extern "C" __device__ float test_logf(float x) {3976 return logf(x);3977}3978 3979// DEFAULT-LABEL: define dso_local i64 @test_lrintf(3980// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3981// DEFAULT-NEXT: [[ENTRY:.*:]]3982// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.rint.f32(float [[X]])3983// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643984// DEFAULT-NEXT: ret i64 [[CONV_I]]3985//3986// FINITEONLY-LABEL: define dso_local i64 @test_lrintf(3987// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3988// FINITEONLY-NEXT: [[ENTRY:.*:]]3989// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract float @llvm.rint.f32(float nofpclass(nan inf) [[X]])3990// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643991// FINITEONLY-NEXT: ret i64 [[CONV_I]]3992//3993// APPROX-LABEL: define dso_local i64 @test_lrintf(3994// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {3995// APPROX-NEXT: [[ENTRY:.*:]]3996// APPROX-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.rint.f32(float [[X]])3997// APPROX-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i643998// APPROX-NEXT: ret i64 [[CONV_I]]3999//4000// NCRDIV-LABEL: define dso_local i64 @test_lrintf(4001// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4002// NCRDIV-NEXT: [[ENTRY:.*:]]4003// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.rint.f32(float [[X]])4004// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644005// NCRDIV-NEXT: ret i64 [[CONV_I]]4006//4007// AMDGCNSPIRV-LABEL: define spir_func i64 @test_lrintf(4008// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {4009// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]4010// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) float @llvm.rint.f32(float [[X]])4011// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644012// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]4013//4014extern "C" __device__ long int test_lrintf(float x) {4015 return lrintf(x);4016}4017 4018// DEFAULT-LABEL: define dso_local i64 @test_lrint(4019// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4020// DEFAULT-NEXT: [[ENTRY:.*:]]4021// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.rint.f64(double [[X]])4022// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644023// DEFAULT-NEXT: ret i64 [[CONV_I]]4024//4025// FINITEONLY-LABEL: define dso_local i64 @test_lrint(4026// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4027// FINITEONLY-NEXT: [[ENTRY:.*:]]4028// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract double @llvm.rint.f64(double nofpclass(nan inf) [[X]])4029// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644030// FINITEONLY-NEXT: ret i64 [[CONV_I]]4031//4032// APPROX-LABEL: define dso_local i64 @test_lrint(4033// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4034// APPROX-NEXT: [[ENTRY:.*:]]4035// APPROX-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.rint.f64(double [[X]])4036// APPROX-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644037// APPROX-NEXT: ret i64 [[CONV_I]]4038//4039// NCRDIV-LABEL: define dso_local i64 @test_lrint(4040// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4041// NCRDIV-NEXT: [[ENTRY:.*:]]4042// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.rint.f64(double [[X]])4043// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644044// NCRDIV-NEXT: ret i64 [[CONV_I]]4045//4046// AMDGCNSPIRV-LABEL: define spir_func i64 @test_lrint(4047// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {4048// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]4049// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) double @llvm.rint.f64(double [[X]])4050// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644051// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]4052//4053extern "C" __device__ long int test_lrint(double x) {4054 return lrint(x);4055}4056 4057// DEFAULT-LABEL: define dso_local i64 @test_lroundf(4058// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4059// DEFAULT-NEXT: [[ENTRY:.*:]]4060// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.round.f32(float [[X]])4061// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644062// DEFAULT-NEXT: ret i64 [[CONV_I]]4063//4064// FINITEONLY-LABEL: define dso_local i64 @test_lroundf(4065// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4066// FINITEONLY-NEXT: [[ENTRY:.*:]]4067// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract float @llvm.round.f32(float nofpclass(nan inf) [[X]])4068// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644069// FINITEONLY-NEXT: ret i64 [[CONV_I]]4070//4071// APPROX-LABEL: define dso_local i64 @test_lroundf(4072// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4073// APPROX-NEXT: [[ENTRY:.*:]]4074// APPROX-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.round.f32(float [[X]])4075// APPROX-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644076// APPROX-NEXT: ret i64 [[CONV_I]]4077//4078// NCRDIV-LABEL: define dso_local i64 @test_lroundf(4079// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4080// NCRDIV-NEXT: [[ENTRY:.*:]]4081// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.round.f32(float [[X]])4082// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644083// NCRDIV-NEXT: ret i64 [[CONV_I]]4084//4085// AMDGCNSPIRV-LABEL: define spir_func i64 @test_lroundf(4086// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {4087// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]4088// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) float @llvm.round.f32(float [[X]])4089// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi float [[TMP0]] to i644090// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]4091//4092extern "C" __device__ long int test_lroundf(float x) {4093 return lroundf(x);4094}4095 4096// DEFAULT-LABEL: define dso_local i64 @test_lround(4097// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4098// DEFAULT-NEXT: [[ENTRY:.*:]]4099// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.round.f64(double [[X]])4100// DEFAULT-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644101// DEFAULT-NEXT: ret i64 [[CONV_I]]4102//4103// FINITEONLY-LABEL: define dso_local i64 @test_lround(4104// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4105// FINITEONLY-NEXT: [[ENTRY:.*:]]4106// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract double @llvm.round.f64(double nofpclass(nan inf) [[X]])4107// FINITEONLY-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644108// FINITEONLY-NEXT: ret i64 [[CONV_I]]4109//4110// APPROX-LABEL: define dso_local i64 @test_lround(4111// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4112// APPROX-NEXT: [[ENTRY:.*:]]4113// APPROX-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.round.f64(double [[X]])4114// APPROX-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644115// APPROX-NEXT: ret i64 [[CONV_I]]4116//4117// NCRDIV-LABEL: define dso_local i64 @test_lround(4118// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {4119// NCRDIV-NEXT: [[ENTRY:.*:]]4120// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract double @llvm.round.f64(double [[X]])4121// NCRDIV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644122// NCRDIV-NEXT: ret i64 [[CONV_I]]4123//4124// AMDGCNSPIRV-LABEL: define spir_func i64 @test_lround(4125// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {4126// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]4127// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) double @llvm.round.f64(double [[X]])4128// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = fptosi double [[TMP0]] to i644129// AMDGCNSPIRV-NEXT: ret i64 [[CONV_I]]4130//4131extern "C" __device__ long int test_lround(double x) {4132 return lround(x);4133}4134 4135// DEFAULT-LABEL: define dso_local noundef float @test_modff(4136// DEFAULT-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4137// DEFAULT-NEXT: [[ENTRY:.*:]]4138// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)4139// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15:[0-9]+]]4140// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract noundef float @__ocml_modf_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4141// DEFAULT-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16:![0-9]+]]4142// DEFAULT-NEXT: store float [[TMP0]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]4143// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4144// DEFAULT-NEXT: ret float [[CALL_I]]4145//4146// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_modff(4147// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4148// FINITEONLY-NEXT: [[ENTRY:.*:]]4149// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)4150// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15:[0-9]+]]4151// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_modf_f32(float noundef nofpclass(nan inf) [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4152// FINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16:![0-9]+]]4153// FINITEONLY-NEXT: store float [[TMP0]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]4154// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4155// FINITEONLY-NEXT: ret float [[CALL_I]]4156//4157// APPROX-LABEL: define dso_local noundef float @test_modff(4158// APPROX-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4159// APPROX-NEXT: [[ENTRY:.*:]]4160// APPROX-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)4161// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15:[0-9]+]]4162// APPROX-NEXT: [[CALL_I:%.*]] = call contract noundef float @__ocml_modf_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4163// APPROX-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16:![0-9]+]]4164// APPROX-NEXT: store float [[TMP0]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]4165// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4166// APPROX-NEXT: ret float [[CALL_I]]4167//4168// NCRDIV-LABEL: define dso_local noundef float @test_modff(4169// NCRDIV-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4170// NCRDIV-NEXT: [[ENTRY:.*:]]4171// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)4172// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15:[0-9]+]]4173// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract noundef float @__ocml_modf_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4174// NCRDIV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA17:![0-9]+]]4175// NCRDIV-NEXT: store float [[TMP0]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]4176// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4177// NCRDIV-NEXT: ret float [[CALL_I]]4178//4179// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_modff(4180// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {4181// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]4182// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca float, align 44183// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)4184// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15:[0-9]+]]4185// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func noundef addrspace(4) float @__ocml_modf_f32(float noundef [[X]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]4186// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(4) [[__TMP_ASCAST_I]], align 4, !tbaa [[FLOAT_TBAA17:![0-9]+]]4187// AMDGCNSPIRV-NEXT: store float [[TMP0]], ptr addrspace(4) [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]4188// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]4189// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]4190//4191extern "C" __device__ float test_modff(float x, float* y) {4192 return modff(x, y);4193}4194 4195// DEFAULT-LABEL: define dso_local noundef double @test_modf(4196// DEFAULT-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4197// DEFAULT-NEXT: [[ENTRY:.*:]]4198// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)4199// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4200// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract noundef double @__ocml_modf_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4201// DEFAULT-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18:![0-9]+]]4202// DEFAULT-NEXT: store double [[TMP0]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]4203// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4204// DEFAULT-NEXT: ret double [[CALL_I]]4205//4206// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_modf(4207// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4208// FINITEONLY-NEXT: [[ENTRY:.*:]]4209// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)4210// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4211// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_modf_f64(double noundef nofpclass(nan inf) [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4212// FINITEONLY-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18:![0-9]+]]4213// FINITEONLY-NEXT: store double [[TMP0]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]4214// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4215// FINITEONLY-NEXT: ret double [[CALL_I]]4216//4217// APPROX-LABEL: define dso_local noundef double @test_modf(4218// APPROX-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4219// APPROX-NEXT: [[ENTRY:.*:]]4220// APPROX-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)4221// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4222// APPROX-NEXT: [[CALL_I:%.*]] = call contract noundef double @__ocml_modf_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4223// APPROX-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18:![0-9]+]]4224// APPROX-NEXT: store double [[TMP0]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]4225// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4226// APPROX-NEXT: ret double [[CALL_I]]4227//4228// NCRDIV-LABEL: define dso_local noundef double @test_modf(4229// NCRDIV-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {4230// NCRDIV-NEXT: [[ENTRY:.*:]]4231// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)4232// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4233// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract noundef double @__ocml_modf_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]4234// NCRDIV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA19:![0-9]+]]4235// NCRDIV-NEXT: store double [[TMP0]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA19]]4236// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]4237// NCRDIV-NEXT: ret double [[CALL_I]]4238//4239// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_modf(4240// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {4241// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]4242// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca double, align 84243// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)4244// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]4245// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func noundef addrspace(4) double @__ocml_modf_f64(double noundef [[X]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]4246// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(4) [[__TMP_ASCAST_I]], align 8, !tbaa [[DOUBLE_TBAA19:![0-9]+]]4247// AMDGCNSPIRV-NEXT: store double [[TMP0]], ptr addrspace(4) [[Y]], align 8, !tbaa [[DOUBLE_TBAA19]]4248// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]4249// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]4250//4251extern "C" __device__ double test_modf(double x, double* y) {4252 return modf(x, y);4253}4254 4255// DEFAULT-LABEL: define dso_local float @test_nanf(4256// DEFAULT-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR2]] {4257// DEFAULT-NEXT: [[ENTRY:.*:]]4258// DEFAULT-NEXT: [[TMP0:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4259// DEFAULT-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484260// DEFAULT-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I_PREHEADER:.*]]4261// DEFAULT: [[WHILE_COND_I14_I_I_PREHEADER]]:4262// DEFAULT-NEXT: [[TMP1:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4263// DEFAULT-NEXT: [[CMP_NOT_I17_I_I5:%.*]] = icmp eq i8 [[TMP1]], 04264// DEFAULT-NEXT: br i1 [[CMP_NOT_I17_I_I5]], label %[[_ZL4NANFPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I_I:.*]]4265// DEFAULT: [[IF_THEN_I_I]]:4266// DEFAULT-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr [[TAG]], i64 14267// DEFAULT-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4268// DEFAULT-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_I_PREHEADER:.*]] [4269// DEFAULT-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4270// DEFAULT-NEXT: i8 88, label %[[IF_THEN5_I_I]]4271// DEFAULT-NEXT: ]4272// DEFAULT: [[WHILE_COND_I_I_I_PREHEADER]]:4273// DEFAULT-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4274// DEFAULT-NEXT: [[CMP_NOT_I_I_I14:%.*]] = icmp eq i8 [[TMP3]], 04275// DEFAULT-NEXT: br i1 [[CMP_NOT_I_I_I14]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I:.*]]4276// DEFAULT: [[IF_THEN5_I_I]]:4277// DEFAULT-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4278// DEFAULT-NEXT: [[CMP_NOT_I30_I_I9:%.*]] = icmp eq i8 [[TMP4]], 04279// DEFAULT-NEXT: br i1 [[CMP_NOT_I30_I_I9]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I31_I_I:.*]]4280// DEFAULT: [[WHILE_BODY_I31_I_I]]:4281// DEFAULT-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I_I]] ]4282// DEFAULT-NEXT: [[__R_0_I29_I_I11:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4283// DEFAULT-NEXT: [[__TAGP_ADDR_0_I28_I_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4284// DEFAULT-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -484285// DEFAULT-NEXT: [[OR_COND_I32_I_I:%.*]] = icmp ult i8 [[TMP6]], 104286// DEFAULT-NEXT: br i1 [[OR_COND_I32_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4287// DEFAULT: [[IF_ELSE_I_I_I]]:4288// DEFAULT-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -974289// DEFAULT-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP7]], 64290// DEFAULT-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4291// DEFAULT: [[IF_ELSE17_I_I_I]]:4292// DEFAULT-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -654293// DEFAULT-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP8]], 64294// DEFAULT-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4295// DEFAULT: [[IF_END31_I_I_I]]:4296// DEFAULT-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4297// DEFAULT-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I29_I_I11]], 44298// DEFAULT-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP5]] to i644299// DEFAULT-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4300// DEFAULT-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4301// DEFAULT-NEXT: [[INCDEC_PTR_I34_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I_I10]], i64 14302// DEFAULT-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4303// DEFAULT-NEXT: [[CMP_NOT_I30_I_I:%.*]] = icmp eq i8 [[TMP9]], 04304// DEFAULT-NEXT: br i1 [[CMP_NOT_I30_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I31_I_I]], !llvm.loop [[LOOP13]]4305// DEFAULT: [[WHILE_BODY_I_I_I]]:4306// DEFAULT-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4307// DEFAULT-NEXT: [[__R_0_I_I_I16:%.*]] = phi i64 [ [[SUB_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ]4308// DEFAULT-NEXT: [[__TAGP_ADDR_0_I_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4309// DEFAULT-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -84310// DEFAULT-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP11]], 484311// DEFAULT-NEXT: br i1 [[OR_COND_I_I_I]], label %[[IF_THEN_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4312// DEFAULT: [[IF_THEN_I_I_I]]:4313// DEFAULT-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I16]], 34314// DEFAULT-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644315// DEFAULT-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484316// DEFAULT-NEXT: [[SUB_I_I_I]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4317// DEFAULT-NEXT: [[INCDEC_PTR_I_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I_I15]], i64 14318// DEFAULT-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4319// DEFAULT-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP12]], 04320// DEFAULT-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I]], !llvm.loop [[LOOP9]]4321// DEFAULT: [[WHILE_BODY_I18_I_I]]:4322// DEFAULT-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4323// DEFAULT-NEXT: [[__R_0_I16_I_I7:%.*]] = phi i64 [ [[SUB_I25_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ]4324// DEFAULT-NEXT: [[__TAGP_ADDR_0_I15_I_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ [[TAG]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4325// DEFAULT-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -484326// DEFAULT-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP14]], 104327// DEFAULT-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[IF_THEN_I21_I_I]], label %[[_ZL4NANFPKC_EXIT]]4328// DEFAULT: [[IF_THEN_I21_I_I]]:4329// DEFAULT-NEXT: [[MUL_I22_I_I:%.*]] = mul i64 [[__R_0_I16_I_I7]], 104330// DEFAULT-NEXT: [[CONV5_I23_I_I:%.*]] = zext nneg i8 [[TMP13]] to i644331// DEFAULT-NEXT: [[ADD_I24_I_I:%.*]] = add i64 [[MUL_I22_I_I]], -484332// DEFAULT-NEXT: [[SUB_I25_I_I]] = add i64 [[ADD_I24_I_I]], [[CONV5_I23_I_I]]4333// DEFAULT-NEXT: [[INCDEC_PTR_I26_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I_I6]], i64 14334// DEFAULT-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4335// DEFAULT-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP15]], 04336// DEFAULT-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]], !llvm.loop [[LOOP12]]4337// DEFAULT: [[_ZL4NANFPKC_EXIT]]:4338// DEFAULT-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ], [ [[SUB_I_I_I]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ [[SUB_I25_I_I]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ]4339// DEFAULT-NEXT: [[CONV_I:%.*]] = trunc i64 [[RETVAL_0_I_I]] to i324340// DEFAULT-NEXT: [[BF_VALUE_I:%.*]] = and i32 [[CONV_I]], 41943034341// DEFAULT-NEXT: [[BF_SET9_I:%.*]] = or disjoint i32 [[BF_VALUE_I]], 21432893444342// DEFAULT-NEXT: [[TMP16:%.*]] = bitcast i32 [[BF_SET9_I]] to float4343// DEFAULT-NEXT: ret float [[TMP16]]4344//4345// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_nanf(4346// FINITEONLY-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR3]] {4347// FINITEONLY-NEXT: [[ENTRY:.*:]]4348// FINITEONLY-NEXT: ret float poison4349//4350// APPROX-LABEL: define dso_local float @test_nanf(4351// APPROX-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR2]] {4352// APPROX-NEXT: [[ENTRY:.*:]]4353// APPROX-NEXT: [[TMP0:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4354// APPROX-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484355// APPROX-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I_PREHEADER:.*]]4356// APPROX: [[WHILE_COND_I14_I_I_PREHEADER]]:4357// APPROX-NEXT: [[TMP1:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4358// APPROX-NEXT: [[CMP_NOT_I17_I_I5:%.*]] = icmp eq i8 [[TMP1]], 04359// APPROX-NEXT: br i1 [[CMP_NOT_I17_I_I5]], label %[[_ZL4NANFPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I_I:.*]]4360// APPROX: [[IF_THEN_I_I]]:4361// APPROX-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr [[TAG]], i64 14362// APPROX-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4363// APPROX-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_I_PREHEADER:.*]] [4364// APPROX-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4365// APPROX-NEXT: i8 88, label %[[IF_THEN5_I_I]]4366// APPROX-NEXT: ]4367// APPROX: [[WHILE_COND_I_I_I_PREHEADER]]:4368// APPROX-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4369// APPROX-NEXT: [[CMP_NOT_I_I_I14:%.*]] = icmp eq i8 [[TMP3]], 04370// APPROX-NEXT: br i1 [[CMP_NOT_I_I_I14]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I:.*]]4371// APPROX: [[IF_THEN5_I_I]]:4372// APPROX-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4373// APPROX-NEXT: [[CMP_NOT_I30_I_I9:%.*]] = icmp eq i8 [[TMP4]], 04374// APPROX-NEXT: br i1 [[CMP_NOT_I30_I_I9]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I31_I_I:.*]]4375// APPROX: [[WHILE_BODY_I31_I_I]]:4376// APPROX-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I_I]] ]4377// APPROX-NEXT: [[__R_0_I29_I_I11:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4378// APPROX-NEXT: [[__TAGP_ADDR_0_I28_I_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4379// APPROX-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -484380// APPROX-NEXT: [[OR_COND_I32_I_I:%.*]] = icmp ult i8 [[TMP6]], 104381// APPROX-NEXT: br i1 [[OR_COND_I32_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4382// APPROX: [[IF_ELSE_I_I_I]]:4383// APPROX-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -974384// APPROX-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP7]], 64385// APPROX-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4386// APPROX: [[IF_ELSE17_I_I_I]]:4387// APPROX-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -654388// APPROX-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP8]], 64389// APPROX-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4390// APPROX: [[IF_END31_I_I_I]]:4391// APPROX-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4392// APPROX-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I29_I_I11]], 44393// APPROX-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP5]] to i644394// APPROX-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4395// APPROX-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4396// APPROX-NEXT: [[INCDEC_PTR_I34_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I_I10]], i64 14397// APPROX-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4398// APPROX-NEXT: [[CMP_NOT_I30_I_I:%.*]] = icmp eq i8 [[TMP9]], 04399// APPROX-NEXT: br i1 [[CMP_NOT_I30_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I31_I_I]], !llvm.loop [[LOOP13]]4400// APPROX: [[WHILE_BODY_I_I_I]]:4401// APPROX-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4402// APPROX-NEXT: [[__R_0_I_I_I16:%.*]] = phi i64 [ [[SUB_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ]4403// APPROX-NEXT: [[__TAGP_ADDR_0_I_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4404// APPROX-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -84405// APPROX-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP11]], 484406// APPROX-NEXT: br i1 [[OR_COND_I_I_I]], label %[[IF_THEN_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4407// APPROX: [[IF_THEN_I_I_I]]:4408// APPROX-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I16]], 34409// APPROX-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644410// APPROX-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484411// APPROX-NEXT: [[SUB_I_I_I]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4412// APPROX-NEXT: [[INCDEC_PTR_I_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I_I15]], i64 14413// APPROX-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4414// APPROX-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP12]], 04415// APPROX-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I]], !llvm.loop [[LOOP9]]4416// APPROX: [[WHILE_BODY_I18_I_I]]:4417// APPROX-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4418// APPROX-NEXT: [[__R_0_I16_I_I7:%.*]] = phi i64 [ [[SUB_I25_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ]4419// APPROX-NEXT: [[__TAGP_ADDR_0_I15_I_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ [[TAG]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4420// APPROX-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -484421// APPROX-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP14]], 104422// APPROX-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[IF_THEN_I21_I_I]], label %[[_ZL4NANFPKC_EXIT]]4423// APPROX: [[IF_THEN_I21_I_I]]:4424// APPROX-NEXT: [[MUL_I22_I_I:%.*]] = mul i64 [[__R_0_I16_I_I7]], 104425// APPROX-NEXT: [[CONV5_I23_I_I:%.*]] = zext nneg i8 [[TMP13]] to i644426// APPROX-NEXT: [[ADD_I24_I_I:%.*]] = add i64 [[MUL_I22_I_I]], -484427// APPROX-NEXT: [[SUB_I25_I_I]] = add i64 [[ADD_I24_I_I]], [[CONV5_I23_I_I]]4428// APPROX-NEXT: [[INCDEC_PTR_I26_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I_I6]], i64 14429// APPROX-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4430// APPROX-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP15]], 04431// APPROX-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]], !llvm.loop [[LOOP12]]4432// APPROX: [[_ZL4NANFPKC_EXIT]]:4433// APPROX-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ], [ [[SUB_I_I_I]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ [[SUB_I25_I_I]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ]4434// APPROX-NEXT: [[CONV_I:%.*]] = trunc i64 [[RETVAL_0_I_I]] to i324435// APPROX-NEXT: [[BF_VALUE_I:%.*]] = and i32 [[CONV_I]], 41943034436// APPROX-NEXT: [[BF_SET9_I:%.*]] = or disjoint i32 [[BF_VALUE_I]], 21432893444437// APPROX-NEXT: [[TMP16:%.*]] = bitcast i32 [[BF_SET9_I]] to float4438// APPROX-NEXT: ret float [[TMP16]]4439//4440// NCRDIV-LABEL: define dso_local float @test_nanf(4441// NCRDIV-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR2]] {4442// NCRDIV-NEXT: [[ENTRY:.*:]]4443// NCRDIV-NEXT: [[TMP0:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4444// NCRDIV-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484445// NCRDIV-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I_PREHEADER:.*]]4446// NCRDIV: [[WHILE_COND_I14_I_I_PREHEADER]]:4447// NCRDIV-NEXT: [[TMP1:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4448// NCRDIV-NEXT: [[CMP_NOT_I17_I_I5:%.*]] = icmp eq i8 [[TMP1]], 04449// NCRDIV-NEXT: br i1 [[CMP_NOT_I17_I_I5]], label %[[_ZL4NANFPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I_I:.*]]4450// NCRDIV: [[IF_THEN_I_I]]:4451// NCRDIV-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr [[TAG]], i64 14452// NCRDIV-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4453// NCRDIV-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_I_PREHEADER:.*]] [4454// NCRDIV-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4455// NCRDIV-NEXT: i8 88, label %[[IF_THEN5_I_I]]4456// NCRDIV-NEXT: ]4457// NCRDIV: [[WHILE_COND_I_I_I_PREHEADER]]:4458// NCRDIV-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4459// NCRDIV-NEXT: [[CMP_NOT_I_I_I14:%.*]] = icmp eq i8 [[TMP3]], 04460// NCRDIV-NEXT: br i1 [[CMP_NOT_I_I_I14]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I:.*]]4461// NCRDIV: [[IF_THEN5_I_I]]:4462// NCRDIV-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4463// NCRDIV-NEXT: [[CMP_NOT_I30_I_I9:%.*]] = icmp eq i8 [[TMP4]], 04464// NCRDIV-NEXT: br i1 [[CMP_NOT_I30_I_I9]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I31_I_I:.*]]4465// NCRDIV: [[WHILE_BODY_I31_I_I]]:4466// NCRDIV-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I_I]] ]4467// NCRDIV-NEXT: [[__R_0_I29_I_I11:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4468// NCRDIV-NEXT: [[__TAGP_ADDR_0_I28_I_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4469// NCRDIV-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -484470// NCRDIV-NEXT: [[OR_COND_I32_I_I:%.*]] = icmp ult i8 [[TMP6]], 104471// NCRDIV-NEXT: br i1 [[OR_COND_I32_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4472// NCRDIV: [[IF_ELSE_I_I_I]]:4473// NCRDIV-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -974474// NCRDIV-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP7]], 64475// NCRDIV-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4476// NCRDIV: [[IF_ELSE17_I_I_I]]:4477// NCRDIV-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -654478// NCRDIV-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP8]], 64479// NCRDIV-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4480// NCRDIV: [[IF_END31_I_I_I]]:4481// NCRDIV-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4482// NCRDIV-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I29_I_I11]], 44483// NCRDIV-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP5]] to i644484// NCRDIV-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4485// NCRDIV-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4486// NCRDIV-NEXT: [[INCDEC_PTR_I34_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I_I10]], i64 14487// NCRDIV-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4488// NCRDIV-NEXT: [[CMP_NOT_I30_I_I:%.*]] = icmp eq i8 [[TMP9]], 04489// NCRDIV-NEXT: br i1 [[CMP_NOT_I30_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I31_I_I]], !llvm.loop [[LOOP13]]4490// NCRDIV: [[WHILE_BODY_I_I_I]]:4491// NCRDIV-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4492// NCRDIV-NEXT: [[__R_0_I_I_I16:%.*]] = phi i64 [ [[SUB_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ]4493// NCRDIV-NEXT: [[__TAGP_ADDR_0_I_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4494// NCRDIV-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -84495// NCRDIV-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP11]], 484496// NCRDIV-NEXT: br i1 [[OR_COND_I_I_I]], label %[[IF_THEN_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4497// NCRDIV: [[IF_THEN_I_I_I]]:4498// NCRDIV-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I16]], 34499// NCRDIV-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644500// NCRDIV-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484501// NCRDIV-NEXT: [[SUB_I_I_I]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4502// NCRDIV-NEXT: [[INCDEC_PTR_I_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I_I15]], i64 14503// NCRDIV-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4504// NCRDIV-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP12]], 04505// NCRDIV-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I]], !llvm.loop [[LOOP9]]4506// NCRDIV: [[WHILE_BODY_I18_I_I]]:4507// NCRDIV-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4508// NCRDIV-NEXT: [[__R_0_I16_I_I7:%.*]] = phi i64 [ [[SUB_I25_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ]4509// NCRDIV-NEXT: [[__TAGP_ADDR_0_I15_I_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ [[TAG]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4510// NCRDIV-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -484511// NCRDIV-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP14]], 104512// NCRDIV-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[IF_THEN_I21_I_I]], label %[[_ZL4NANFPKC_EXIT]]4513// NCRDIV: [[IF_THEN_I21_I_I]]:4514// NCRDIV-NEXT: [[MUL_I22_I_I:%.*]] = mul i64 [[__R_0_I16_I_I7]], 104515// NCRDIV-NEXT: [[CONV5_I23_I_I:%.*]] = zext nneg i8 [[TMP13]] to i644516// NCRDIV-NEXT: [[ADD_I24_I_I:%.*]] = add i64 [[MUL_I22_I_I]], -484517// NCRDIV-NEXT: [[SUB_I25_I_I]] = add i64 [[ADD_I24_I_I]], [[CONV5_I23_I_I]]4518// NCRDIV-NEXT: [[INCDEC_PTR_I26_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I_I6]], i64 14519// NCRDIV-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4520// NCRDIV-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP15]], 04521// NCRDIV-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]], !llvm.loop [[LOOP12]]4522// NCRDIV: [[_ZL4NANFPKC_EXIT]]:4523// NCRDIV-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ], [ [[SUB_I_I_I]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ [[SUB_I25_I_I]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ]4524// NCRDIV-NEXT: [[CONV_I:%.*]] = trunc i64 [[RETVAL_0_I_I]] to i324525// NCRDIV-NEXT: [[BF_VALUE_I:%.*]] = and i32 [[CONV_I]], 41943034526// NCRDIV-NEXT: [[BF_SET9_I:%.*]] = or disjoint i32 [[BF_VALUE_I]], 21432893444527// NCRDIV-NEXT: [[TMP16:%.*]] = bitcast i32 [[BF_SET9_I]] to float4528// NCRDIV-NEXT: ret float [[TMP16]]4529//4530// AMDGCNSPIRV-LABEL: define spir_func float @test_nanf(4531// AMDGCNSPIRV-SAME: ptr addrspace(4) noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {4532// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:4533// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i8, ptr addrspace(4) [[TAG]], align 1, !tbaa [[CHAR_TBAA9]]4534// AMDGCNSPIRV-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484535// AMDGCNSPIRV-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I:.*]]4536// AMDGCNSPIRV: [[IF_THEN_I_I]]:4537// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[TAG]], i64 14538// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4539// AMDGCNSPIRV-NEXT: switch i8 [[TMP1]], label %[[WHILE_COND_I_I_I:.*]] [4540// AMDGCNSPIRV-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4541// AMDGCNSPIRV-NEXT: i8 88, label %[[IF_THEN5_I_I]]4542// AMDGCNSPIRV-NEXT: ]4543// AMDGCNSPIRV: [[IF_THEN5_I_I]]:4544// AMDGCNSPIRV-NEXT: [[TMP2:%.*]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4545// AMDGCNSPIRV-NEXT: [[CMP_NOT_I31_I_I5:%.*]] = icmp eq i8 [[TMP2]], 04546// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I31_I_I5]], label %[[_ZL4NANFPKC_EXIT:.*]], label %[[WHILE_BODY_I32_I_I:.*]]4547// AMDGCNSPIRV: [[WHILE_BODY_I32_I_I]]:4548// AMDGCNSPIRV-NEXT: [[TMP3:%.*]] = phi i8 [ [[TMP7:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP2]], %[[IF_THEN5_I_I]] ]4549// AMDGCNSPIRV-NEXT: [[__R_0_I30_I_I7:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4550// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I29_I_I6:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I36_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4551// AMDGCNSPIRV-NEXT: [[TMP4:%.*]] = add i8 [[TMP3]], -484552// AMDGCNSPIRV-NEXT: [[OR_COND_I33_I_I:%.*]] = icmp ult i8 [[TMP4]], 104553// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I33_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4554// AMDGCNSPIRV: [[IF_ELSE_I_I_I]]:4555// AMDGCNSPIRV-NEXT: [[TMP5:%.*]] = add i8 [[TMP3]], -974556// AMDGCNSPIRV-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP5]], 64557// AMDGCNSPIRV-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4558// AMDGCNSPIRV: [[IF_ELSE17_I_I_I]]:4559// AMDGCNSPIRV-NEXT: [[TMP6:%.*]] = add i8 [[TMP3]], -654560// AMDGCNSPIRV-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP6]], 64561// AMDGCNSPIRV-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL4NANFPKC_EXIT]]4562// AMDGCNSPIRV: [[IF_END31_I_I_I]]:4563// AMDGCNSPIRV-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I32_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4564// AMDGCNSPIRV-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I30_I_I7]], 44565// AMDGCNSPIRV-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP3]] to i644566// AMDGCNSPIRV-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4567// AMDGCNSPIRV-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4568// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I36_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I29_I_I6]], i64 14569// AMDGCNSPIRV-NEXT: [[TMP7]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I36_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4570// AMDGCNSPIRV-NEXT: [[CMP_NOT_I31_I_I:%.*]] = icmp eq i8 [[TMP7]], 04571// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I31_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I32_I_I]], !llvm.loop [[LOOP14]]4572// AMDGCNSPIRV: [[WHILE_COND_I_I_I]]:4573// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I_I_I:%.*]] = phi ptr addrspace(4) [ [[__TAGP_ADDR_1_I_I_I:%.*]], %[[WHILE_BODY_I_I_I:.*]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN_I_I]] ]4574// AMDGCNSPIRV-NEXT: [[__R_0_I_I_I:%.*]] = phi i64 [ [[__R_1_I_I_I:%.*]], %[[WHILE_BODY_I_I_I]] ], [ 0, %[[IF_THEN_I_I]] ]4575// AMDGCNSPIRV-NEXT: [[TMP8:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4576// AMDGCNSPIRV-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP8]], 04577// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I_I_I]]4578// AMDGCNSPIRV: [[WHILE_BODY_I_I_I]]:4579// AMDGCNSPIRV-NEXT: [[TMP9:%.*]] = and i8 [[TMP8]], -84580// AMDGCNSPIRV-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP9]], 484581// AMDGCNSPIRV-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I]], 34582// AMDGCNSPIRV-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP8]] to i644583// AMDGCNSPIRV-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484584// AMDGCNSPIRV-NEXT: [[SUB_I_I_I:%.*]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4585// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_I_I_IDX:%.*]] = zext i1 [[OR_COND_I_I_I]] to i644586// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I_I_I]], i64 [[__TAGP_ADDR_1_I_I_I_IDX]]4587// AMDGCNSPIRV-NEXT: [[__R_1_I_I_I]] = select i1 [[OR_COND_I_I_I]], i64 [[SUB_I_I_I]], i64 [[__R_0_I_I_I]]4588// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I_I_I]], label %[[WHILE_COND_I_I_I]], label %[[_ZL4NANFPKC_EXIT]], !llvm.loop [[LOOP10]]4589// AMDGCNSPIRV: [[WHILE_COND_I14_I_I]]:4590// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I15_I_I:%.*]] = phi ptr addrspace(4) [ [[__TAGP_ADDR_1_I25_I_I:%.*]], %[[WHILE_BODY_I18_I_I:.*]] ], [ [[TAG]], %[[ENTRY]] ]4591// AMDGCNSPIRV-NEXT: [[__R_0_I16_I_I:%.*]] = phi i64 [ [[__R_1_I26_I_I:%.*]], %[[WHILE_BODY_I18_I_I]] ], [ 0, %[[ENTRY]] ]4592// AMDGCNSPIRV-NEXT: [[TMP10:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I15_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4593// AMDGCNSPIRV-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP10]], 04594// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL4NANFPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]]4595// AMDGCNSPIRV: [[WHILE_BODY_I18_I_I]]:4596// AMDGCNSPIRV-NEXT: [[TMP11:%.*]] = add i8 [[TMP10]], -484597// AMDGCNSPIRV-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP11]], 104598// AMDGCNSPIRV-NEXT: [[MUL_I20_I_I:%.*]] = mul i64 [[__R_0_I16_I_I]], 104599// AMDGCNSPIRV-NEXT: [[CONV5_I21_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644600// AMDGCNSPIRV-NEXT: [[ADD_I22_I_I:%.*]] = add i64 [[MUL_I20_I_I]], -484601// AMDGCNSPIRV-NEXT: [[SUB_I23_I_I:%.*]] = add i64 [[ADD_I22_I_I]], [[CONV5_I21_I_I]]4602// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I25_I_I_IDX:%.*]] = zext i1 [[OR_COND_I19_I_I]] to i644603// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I25_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I15_I_I]], i64 [[__TAGP_ADDR_1_I25_I_I_IDX]]4604// AMDGCNSPIRV-NEXT: [[__R_1_I26_I_I]] = select i1 [[OR_COND_I19_I_I]], i64 [[SUB_I23_I_I]], i64 [[__R_0_I16_I_I]]4605// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[WHILE_COND_I14_I_I]], label %[[_ZL4NANFPKC_EXIT]], !llvm.loop [[LOOP13]]4606// AMDGCNSPIRV: [[_ZL4NANFPKC_EXIT]]:4607// AMDGCNSPIRV-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[__R_0_I_I_I]], %[[WHILE_COND_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ], [ [[__R_0_I16_I_I]], %[[WHILE_COND_I14_I_I]] ]4608// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = trunc i64 [[RETVAL_0_I_I]] to i324609// AMDGCNSPIRV-NEXT: [[BF_VALUE_I:%.*]] = and i32 [[CONV_I]], 41943034610// AMDGCNSPIRV-NEXT: [[BF_SET9_I:%.*]] = or disjoint i32 [[BF_VALUE_I]], 21432893444611// AMDGCNSPIRV-NEXT: [[TMP12:%.*]] = bitcast i32 [[BF_SET9_I]] to float4612// AMDGCNSPIRV-NEXT: ret float [[TMP12]]4613//4614extern "C" __device__ float test_nanf(const char *tag) {4615 return nanf(tag);4616}4617 4618// DEFAULT-LABEL: define dso_local double @test_nan(4619// DEFAULT-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR2]] {4620// DEFAULT-NEXT: [[ENTRY:.*:]]4621// DEFAULT-NEXT: [[TMP0:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4622// DEFAULT-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484623// DEFAULT-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I_PREHEADER:.*]]4624// DEFAULT: [[WHILE_COND_I14_I_I_PREHEADER]]:4625// DEFAULT-NEXT: [[TMP1:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4626// DEFAULT-NEXT: [[CMP_NOT_I17_I_I5:%.*]] = icmp eq i8 [[TMP1]], 04627// DEFAULT-NEXT: br i1 [[CMP_NOT_I17_I_I5]], label %[[_ZL3NANPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I_I:.*]]4628// DEFAULT: [[IF_THEN_I_I]]:4629// DEFAULT-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr [[TAG]], i64 14630// DEFAULT-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4631// DEFAULT-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_I_PREHEADER:.*]] [4632// DEFAULT-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4633// DEFAULT-NEXT: i8 88, label %[[IF_THEN5_I_I]]4634// DEFAULT-NEXT: ]4635// DEFAULT: [[WHILE_COND_I_I_I_PREHEADER]]:4636// DEFAULT-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4637// DEFAULT-NEXT: [[CMP_NOT_I_I_I14:%.*]] = icmp eq i8 [[TMP3]], 04638// DEFAULT-NEXT: br i1 [[CMP_NOT_I_I_I14]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I:.*]]4639// DEFAULT: [[IF_THEN5_I_I]]:4640// DEFAULT-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4641// DEFAULT-NEXT: [[CMP_NOT_I30_I_I9:%.*]] = icmp eq i8 [[TMP4]], 04642// DEFAULT-NEXT: br i1 [[CMP_NOT_I30_I_I9]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I31_I_I:.*]]4643// DEFAULT: [[WHILE_BODY_I31_I_I]]:4644// DEFAULT-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I_I]] ]4645// DEFAULT-NEXT: [[__R_0_I29_I_I11:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4646// DEFAULT-NEXT: [[__TAGP_ADDR_0_I28_I_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4647// DEFAULT-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -484648// DEFAULT-NEXT: [[OR_COND_I32_I_I:%.*]] = icmp ult i8 [[TMP6]], 104649// DEFAULT-NEXT: br i1 [[OR_COND_I32_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4650// DEFAULT: [[IF_ELSE_I_I_I]]:4651// DEFAULT-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -974652// DEFAULT-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP7]], 64653// DEFAULT-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4654// DEFAULT: [[IF_ELSE17_I_I_I]]:4655// DEFAULT-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -654656// DEFAULT-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP8]], 64657// DEFAULT-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4658// DEFAULT: [[IF_END31_I_I_I]]:4659// DEFAULT-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4660// DEFAULT-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I29_I_I11]], 44661// DEFAULT-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP5]] to i644662// DEFAULT-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4663// DEFAULT-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4664// DEFAULT-NEXT: [[INCDEC_PTR_I34_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I_I10]], i64 14665// DEFAULT-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4666// DEFAULT-NEXT: [[CMP_NOT_I30_I_I:%.*]] = icmp eq i8 [[TMP9]], 04667// DEFAULT-NEXT: br i1 [[CMP_NOT_I30_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I31_I_I]], !llvm.loop [[LOOP13]]4668// DEFAULT: [[WHILE_BODY_I_I_I]]:4669// DEFAULT-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4670// DEFAULT-NEXT: [[__R_0_I_I_I16:%.*]] = phi i64 [ [[SUB_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ]4671// DEFAULT-NEXT: [[__TAGP_ADDR_0_I_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4672// DEFAULT-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -84673// DEFAULT-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP11]], 484674// DEFAULT-NEXT: br i1 [[OR_COND_I_I_I]], label %[[IF_THEN_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4675// DEFAULT: [[IF_THEN_I_I_I]]:4676// DEFAULT-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I16]], 34677// DEFAULT-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644678// DEFAULT-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484679// DEFAULT-NEXT: [[SUB_I_I_I]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4680// DEFAULT-NEXT: [[INCDEC_PTR_I_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I_I15]], i64 14681// DEFAULT-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4682// DEFAULT-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP12]], 04683// DEFAULT-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I]], !llvm.loop [[LOOP9]]4684// DEFAULT: [[WHILE_BODY_I18_I_I]]:4685// DEFAULT-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4686// DEFAULT-NEXT: [[__R_0_I16_I_I7:%.*]] = phi i64 [ [[SUB_I25_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ]4687// DEFAULT-NEXT: [[__TAGP_ADDR_0_I15_I_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ [[TAG]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4688// DEFAULT-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -484689// DEFAULT-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP14]], 104690// DEFAULT-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[IF_THEN_I21_I_I]], label %[[_ZL3NANPKC_EXIT]]4691// DEFAULT: [[IF_THEN_I21_I_I]]:4692// DEFAULT-NEXT: [[MUL_I22_I_I:%.*]] = mul i64 [[__R_0_I16_I_I7]], 104693// DEFAULT-NEXT: [[CONV5_I23_I_I:%.*]] = zext nneg i8 [[TMP13]] to i644694// DEFAULT-NEXT: [[ADD_I24_I_I:%.*]] = add i64 [[MUL_I22_I_I]], -484695// DEFAULT-NEXT: [[SUB_I25_I_I]] = add i64 [[ADD_I24_I_I]], [[CONV5_I23_I_I]]4696// DEFAULT-NEXT: [[INCDEC_PTR_I26_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I_I6]], i64 14697// DEFAULT-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4698// DEFAULT-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP15]], 04699// DEFAULT-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]], !llvm.loop [[LOOP12]]4700// DEFAULT: [[_ZL3NANPKC_EXIT]]:4701// DEFAULT-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ], [ [[SUB_I_I_I]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ [[SUB_I25_I_I]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ]4702// DEFAULT-NEXT: [[BF_VALUE_I:%.*]] = and i64 [[RETVAL_0_I_I]], 22517998136852474703// DEFAULT-NEXT: [[BF_SET9_I:%.*]] = or disjoint i64 [[BF_VALUE_I]], 92211202370410905604704// DEFAULT-NEXT: [[TMP16:%.*]] = bitcast i64 [[BF_SET9_I]] to double4705// DEFAULT-NEXT: ret double [[TMP16]]4706//4707// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test_nan(4708// FINITEONLY-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR3]] {4709// FINITEONLY-NEXT: [[ENTRY:.*:]]4710// FINITEONLY-NEXT: ret double poison4711//4712// APPROX-LABEL: define dso_local double @test_nan(4713// APPROX-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR2]] {4714// APPROX-NEXT: [[ENTRY:.*:]]4715// APPROX-NEXT: [[TMP0:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4716// APPROX-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484717// APPROX-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I_PREHEADER:.*]]4718// APPROX: [[WHILE_COND_I14_I_I_PREHEADER]]:4719// APPROX-NEXT: [[TMP1:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4720// APPROX-NEXT: [[CMP_NOT_I17_I_I5:%.*]] = icmp eq i8 [[TMP1]], 04721// APPROX-NEXT: br i1 [[CMP_NOT_I17_I_I5]], label %[[_ZL3NANPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I_I:.*]]4722// APPROX: [[IF_THEN_I_I]]:4723// APPROX-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr [[TAG]], i64 14724// APPROX-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4725// APPROX-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_I_PREHEADER:.*]] [4726// APPROX-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4727// APPROX-NEXT: i8 88, label %[[IF_THEN5_I_I]]4728// APPROX-NEXT: ]4729// APPROX: [[WHILE_COND_I_I_I_PREHEADER]]:4730// APPROX-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4731// APPROX-NEXT: [[CMP_NOT_I_I_I14:%.*]] = icmp eq i8 [[TMP3]], 04732// APPROX-NEXT: br i1 [[CMP_NOT_I_I_I14]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I:.*]]4733// APPROX: [[IF_THEN5_I_I]]:4734// APPROX-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4735// APPROX-NEXT: [[CMP_NOT_I30_I_I9:%.*]] = icmp eq i8 [[TMP4]], 04736// APPROX-NEXT: br i1 [[CMP_NOT_I30_I_I9]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I31_I_I:.*]]4737// APPROX: [[WHILE_BODY_I31_I_I]]:4738// APPROX-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I_I]] ]4739// APPROX-NEXT: [[__R_0_I29_I_I11:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4740// APPROX-NEXT: [[__TAGP_ADDR_0_I28_I_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4741// APPROX-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -484742// APPROX-NEXT: [[OR_COND_I32_I_I:%.*]] = icmp ult i8 [[TMP6]], 104743// APPROX-NEXT: br i1 [[OR_COND_I32_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4744// APPROX: [[IF_ELSE_I_I_I]]:4745// APPROX-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -974746// APPROX-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP7]], 64747// APPROX-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4748// APPROX: [[IF_ELSE17_I_I_I]]:4749// APPROX-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -654750// APPROX-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP8]], 64751// APPROX-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4752// APPROX: [[IF_END31_I_I_I]]:4753// APPROX-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4754// APPROX-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I29_I_I11]], 44755// APPROX-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP5]] to i644756// APPROX-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4757// APPROX-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4758// APPROX-NEXT: [[INCDEC_PTR_I34_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I_I10]], i64 14759// APPROX-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4760// APPROX-NEXT: [[CMP_NOT_I30_I_I:%.*]] = icmp eq i8 [[TMP9]], 04761// APPROX-NEXT: br i1 [[CMP_NOT_I30_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I31_I_I]], !llvm.loop [[LOOP13]]4762// APPROX: [[WHILE_BODY_I_I_I]]:4763// APPROX-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4764// APPROX-NEXT: [[__R_0_I_I_I16:%.*]] = phi i64 [ [[SUB_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ]4765// APPROX-NEXT: [[__TAGP_ADDR_0_I_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4766// APPROX-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -84767// APPROX-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP11]], 484768// APPROX-NEXT: br i1 [[OR_COND_I_I_I]], label %[[IF_THEN_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4769// APPROX: [[IF_THEN_I_I_I]]:4770// APPROX-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I16]], 34771// APPROX-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644772// APPROX-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484773// APPROX-NEXT: [[SUB_I_I_I]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4774// APPROX-NEXT: [[INCDEC_PTR_I_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I_I15]], i64 14775// APPROX-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4776// APPROX-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP12]], 04777// APPROX-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I]], !llvm.loop [[LOOP9]]4778// APPROX: [[WHILE_BODY_I18_I_I]]:4779// APPROX-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4780// APPROX-NEXT: [[__R_0_I16_I_I7:%.*]] = phi i64 [ [[SUB_I25_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ]4781// APPROX-NEXT: [[__TAGP_ADDR_0_I15_I_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ [[TAG]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4782// APPROX-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -484783// APPROX-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP14]], 104784// APPROX-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[IF_THEN_I21_I_I]], label %[[_ZL3NANPKC_EXIT]]4785// APPROX: [[IF_THEN_I21_I_I]]:4786// APPROX-NEXT: [[MUL_I22_I_I:%.*]] = mul i64 [[__R_0_I16_I_I7]], 104787// APPROX-NEXT: [[CONV5_I23_I_I:%.*]] = zext nneg i8 [[TMP13]] to i644788// APPROX-NEXT: [[ADD_I24_I_I:%.*]] = add i64 [[MUL_I22_I_I]], -484789// APPROX-NEXT: [[SUB_I25_I_I]] = add i64 [[ADD_I24_I_I]], [[CONV5_I23_I_I]]4790// APPROX-NEXT: [[INCDEC_PTR_I26_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I_I6]], i64 14791// APPROX-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4792// APPROX-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP15]], 04793// APPROX-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]], !llvm.loop [[LOOP12]]4794// APPROX: [[_ZL3NANPKC_EXIT]]:4795// APPROX-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ], [ [[SUB_I_I_I]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ [[SUB_I25_I_I]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ]4796// APPROX-NEXT: [[BF_VALUE_I:%.*]] = and i64 [[RETVAL_0_I_I]], 22517998136852474797// APPROX-NEXT: [[BF_SET9_I:%.*]] = or disjoint i64 [[BF_VALUE_I]], 92211202370410905604798// APPROX-NEXT: [[TMP16:%.*]] = bitcast i64 [[BF_SET9_I]] to double4799// APPROX-NEXT: ret double [[TMP16]]4800//4801// NCRDIV-LABEL: define dso_local double @test_nan(4802// NCRDIV-SAME: ptr noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr #[[ATTR2]] {4803// NCRDIV-NEXT: [[ENTRY:.*:]]4804// NCRDIV-NEXT: [[TMP0:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4805// NCRDIV-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484806// NCRDIV-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I_PREHEADER:.*]]4807// NCRDIV: [[WHILE_COND_I14_I_I_PREHEADER]]:4808// NCRDIV-NEXT: [[TMP1:%.*]] = load i8, ptr [[TAG]], align 1, !tbaa [[CHAR_TBAA8]]4809// NCRDIV-NEXT: [[CMP_NOT_I17_I_I5:%.*]] = icmp eq i8 [[TMP1]], 04810// NCRDIV-NEXT: br i1 [[CMP_NOT_I17_I_I5]], label %[[_ZL3NANPKC_EXIT:.*]], label %[[WHILE_BODY_I18_I_I:.*]]4811// NCRDIV: [[IF_THEN_I_I]]:4812// NCRDIV-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr [[TAG]], i64 14813// NCRDIV-NEXT: [[TMP2:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4814// NCRDIV-NEXT: switch i8 [[TMP2]], label %[[WHILE_COND_I_I_I_PREHEADER:.*]] [4815// NCRDIV-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4816// NCRDIV-NEXT: i8 88, label %[[IF_THEN5_I_I]]4817// NCRDIV-NEXT: ]4818// NCRDIV: [[WHILE_COND_I_I_I_PREHEADER]]:4819// NCRDIV-NEXT: [[TMP3:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4820// NCRDIV-NEXT: [[CMP_NOT_I_I_I14:%.*]] = icmp eq i8 [[TMP3]], 04821// NCRDIV-NEXT: br i1 [[CMP_NOT_I_I_I14]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I:.*]]4822// NCRDIV: [[IF_THEN5_I_I]]:4823// NCRDIV-NEXT: [[TMP4:%.*]] = load i8, ptr [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4824// NCRDIV-NEXT: [[CMP_NOT_I30_I_I9:%.*]] = icmp eq i8 [[TMP4]], 04825// NCRDIV-NEXT: br i1 [[CMP_NOT_I30_I_I9]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I31_I_I:.*]]4826// NCRDIV: [[WHILE_BODY_I31_I_I]]:4827// NCRDIV-NEXT: [[TMP5:%.*]] = phi i8 [ [[TMP9:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP4]], %[[IF_THEN5_I_I]] ]4828// NCRDIV-NEXT: [[__R_0_I29_I_I11:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4829// NCRDIV-NEXT: [[__TAGP_ADDR_0_I28_I_I10:%.*]] = phi ptr [ [[INCDEC_PTR_I34_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4830// NCRDIV-NEXT: [[TMP6:%.*]] = add i8 [[TMP5]], -484831// NCRDIV-NEXT: [[OR_COND_I32_I_I:%.*]] = icmp ult i8 [[TMP6]], 104832// NCRDIV-NEXT: br i1 [[OR_COND_I32_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4833// NCRDIV: [[IF_ELSE_I_I_I]]:4834// NCRDIV-NEXT: [[TMP7:%.*]] = add i8 [[TMP5]], -974835// NCRDIV-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP7]], 64836// NCRDIV-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4837// NCRDIV: [[IF_ELSE17_I_I_I]]:4838// NCRDIV-NEXT: [[TMP8:%.*]] = add i8 [[TMP5]], -654839// NCRDIV-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP8]], 64840// NCRDIV-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4841// NCRDIV: [[IF_END31_I_I_I]]:4842// NCRDIV-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I31_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4843// NCRDIV-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I29_I_I11]], 44844// NCRDIV-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP5]] to i644845// NCRDIV-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4846// NCRDIV-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4847// NCRDIV-NEXT: [[INCDEC_PTR_I34_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I28_I_I10]], i64 14848// NCRDIV-NEXT: [[TMP9]] = load i8, ptr [[INCDEC_PTR_I34_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4849// NCRDIV-NEXT: [[CMP_NOT_I30_I_I:%.*]] = icmp eq i8 [[TMP9]], 04850// NCRDIV-NEXT: br i1 [[CMP_NOT_I30_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I31_I_I]], !llvm.loop [[LOOP13]]4851// NCRDIV: [[WHILE_BODY_I_I_I]]:4852// NCRDIV-NEXT: [[TMP10:%.*]] = phi i8 [ [[TMP12:%.*]], %[[IF_THEN_I_I_I:.*]] ], [ [[TMP3]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4853// NCRDIV-NEXT: [[__R_0_I_I_I16:%.*]] = phi i64 [ [[SUB_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ]4854// NCRDIV-NEXT: [[__TAGP_ADDR_0_I_I_I15:%.*]] = phi ptr [ [[INCDEC_PTR_I_I_I:%.*]], %[[IF_THEN_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[WHILE_COND_I_I_I_PREHEADER]] ]4855// NCRDIV-NEXT: [[TMP11:%.*]] = and i8 [[TMP10]], -84856// NCRDIV-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP11]], 484857// NCRDIV-NEXT: br i1 [[OR_COND_I_I_I]], label %[[IF_THEN_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4858// NCRDIV: [[IF_THEN_I_I_I]]:4859// NCRDIV-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I16]], 34860// NCRDIV-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644861// NCRDIV-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484862// NCRDIV-NEXT: [[SUB_I_I_I]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4863// NCRDIV-NEXT: [[INCDEC_PTR_I_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I_I_I15]], i64 14864// NCRDIV-NEXT: [[TMP12]] = load i8, ptr [[INCDEC_PTR_I_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4865// NCRDIV-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP12]], 04866// NCRDIV-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I]], !llvm.loop [[LOOP9]]4867// NCRDIV: [[WHILE_BODY_I18_I_I]]:4868// NCRDIV-NEXT: [[TMP13:%.*]] = phi i8 [ [[TMP15:%.*]], %[[IF_THEN_I21_I_I:.*]] ], [ [[TMP1]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4869// NCRDIV-NEXT: [[__R_0_I16_I_I7:%.*]] = phi i64 [ [[SUB_I25_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ]4870// NCRDIV-NEXT: [[__TAGP_ADDR_0_I15_I_I6:%.*]] = phi ptr [ [[INCDEC_PTR_I26_I_I:%.*]], %[[IF_THEN_I21_I_I]] ], [ [[TAG]], %[[WHILE_COND_I14_I_I_PREHEADER]] ]4871// NCRDIV-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], -484872// NCRDIV-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP14]], 104873// NCRDIV-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[IF_THEN_I21_I_I]], label %[[_ZL3NANPKC_EXIT]]4874// NCRDIV: [[IF_THEN_I21_I_I]]:4875// NCRDIV-NEXT: [[MUL_I22_I_I:%.*]] = mul i64 [[__R_0_I16_I_I7]], 104876// NCRDIV-NEXT: [[CONV5_I23_I_I:%.*]] = zext nneg i8 [[TMP13]] to i644877// NCRDIV-NEXT: [[ADD_I24_I_I:%.*]] = add i64 [[MUL_I22_I_I]], -484878// NCRDIV-NEXT: [[SUB_I25_I_I]] = add i64 [[ADD_I24_I_I]], [[CONV5_I23_I_I]]4879// NCRDIV-NEXT: [[INCDEC_PTR_I26_I_I]] = getelementptr inbounds nuw i8, ptr [[__TAGP_ADDR_0_I15_I_I6]], i64 14880// NCRDIV-NEXT: [[TMP15]] = load i8, ptr [[INCDEC_PTR_I26_I_I]], align 1, !tbaa [[CHAR_TBAA8]]4881// NCRDIV-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP15]], 04882// NCRDIV-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]], !llvm.loop [[LOOP12]]4883// NCRDIV: [[_ZL3NANPKC_EXIT]]:4884// NCRDIV-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[WHILE_COND_I_I_I_PREHEADER]] ], [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_COND_I14_I_I_PREHEADER]] ], [ [[SUB_I_I_I]], %[[IF_THEN_I_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ [[SUB_I25_I_I]], %[[IF_THEN_I21_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ]4885// NCRDIV-NEXT: [[BF_VALUE_I:%.*]] = and i64 [[RETVAL_0_I_I]], 22517998136852474886// NCRDIV-NEXT: [[BF_SET9_I:%.*]] = or disjoint i64 [[BF_VALUE_I]], 92211202370410905604887// NCRDIV-NEXT: [[TMP16:%.*]] = bitcast i64 [[BF_SET9_I]] to double4888// NCRDIV-NEXT: ret double [[TMP16]]4889//4890// AMDGCNSPIRV-LABEL: define spir_func double @test_nan(4891// AMDGCNSPIRV-SAME: ptr addrspace(4) noundef readonly captures(none) [[TAG:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {4892// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:4893// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i8, ptr addrspace(4) [[TAG]], align 1, !tbaa [[CHAR_TBAA9]]4894// AMDGCNSPIRV-NEXT: [[CMP_I_I:%.*]] = icmp eq i8 [[TMP0]], 484895// AMDGCNSPIRV-NEXT: br i1 [[CMP_I_I]], label %[[IF_THEN_I_I:.*]], label %[[WHILE_COND_I14_I_I:.*]]4896// AMDGCNSPIRV: [[IF_THEN_I_I]]:4897// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I_I:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[TAG]], i64 14898// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4899// AMDGCNSPIRV-NEXT: switch i8 [[TMP1]], label %[[WHILE_COND_I_I_I:.*]] [4900// AMDGCNSPIRV-NEXT: i8 120, label %[[IF_THEN5_I_I:.*]]4901// AMDGCNSPIRV-NEXT: i8 88, label %[[IF_THEN5_I_I]]4902// AMDGCNSPIRV-NEXT: ]4903// AMDGCNSPIRV: [[IF_THEN5_I_I]]:4904// AMDGCNSPIRV-NEXT: [[TMP2:%.*]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4905// AMDGCNSPIRV-NEXT: [[CMP_NOT_I31_I_I5:%.*]] = icmp eq i8 [[TMP2]], 04906// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I31_I_I5]], label %[[_ZL3NANPKC_EXIT:.*]], label %[[WHILE_BODY_I32_I_I:.*]]4907// AMDGCNSPIRV: [[WHILE_BODY_I32_I_I]]:4908// AMDGCNSPIRV-NEXT: [[TMP3:%.*]] = phi i8 [ [[TMP7:%.*]], %[[IF_END31_I_I_I:.*]] ], [ [[TMP2]], %[[IF_THEN5_I_I]] ]4909// AMDGCNSPIRV-NEXT: [[__R_0_I30_I_I7:%.*]] = phi i64 [ [[ADD28_I_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_THEN5_I_I]] ]4910// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I29_I_I6:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I36_I_I:%.*]], %[[IF_END31_I_I_I]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN5_I_I]] ]4911// AMDGCNSPIRV-NEXT: [[TMP4:%.*]] = add i8 [[TMP3]], -484912// AMDGCNSPIRV-NEXT: [[OR_COND_I33_I_I:%.*]] = icmp ult i8 [[TMP4]], 104913// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I33_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE_I_I_I:.*]]4914// AMDGCNSPIRV: [[IF_ELSE_I_I_I]]:4915// AMDGCNSPIRV-NEXT: [[TMP5:%.*]] = add i8 [[TMP3]], -974916// AMDGCNSPIRV-NEXT: [[OR_COND33_I_I_I:%.*]] = icmp ult i8 [[TMP5]], 64917// AMDGCNSPIRV-NEXT: br i1 [[OR_COND33_I_I_I]], label %[[IF_END31_I_I_I]], label %[[IF_ELSE17_I_I_I:.*]]4918// AMDGCNSPIRV: [[IF_ELSE17_I_I_I]]:4919// AMDGCNSPIRV-NEXT: [[TMP6:%.*]] = add i8 [[TMP3]], -654920// AMDGCNSPIRV-NEXT: [[OR_COND34_I_I_I:%.*]] = icmp ult i8 [[TMP6]], 64921// AMDGCNSPIRV-NEXT: br i1 [[OR_COND34_I_I_I]], label %[[IF_END31_I_I_I]], label %[[_ZL3NANPKC_EXIT]]4922// AMDGCNSPIRV: [[IF_END31_I_I_I]]:4923// AMDGCNSPIRV-NEXT: [[DOTSINK:%.*]] = phi i64 [ -48, %[[WHILE_BODY_I32_I_I]] ], [ -87, %[[IF_ELSE_I_I_I]] ], [ -55, %[[IF_ELSE17_I_I_I]] ]4924// AMDGCNSPIRV-NEXT: [[MUL24_I_I_I:%.*]] = shl i64 [[__R_0_I30_I_I7]], 44925// AMDGCNSPIRV-NEXT: [[CONV25_I_I_I:%.*]] = zext nneg i8 [[TMP3]] to i644926// AMDGCNSPIRV-NEXT: [[ADD26_I_I_I:%.*]] = add i64 [[MUL24_I_I_I]], [[DOTSINK]]4927// AMDGCNSPIRV-NEXT: [[ADD28_I_I_I]] = add i64 [[ADD26_I_I_I]], [[CONV25_I_I_I]]4928// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I36_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I29_I_I6]], i64 14929// AMDGCNSPIRV-NEXT: [[TMP7]] = load i8, ptr addrspace(4) [[INCDEC_PTR_I36_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4930// AMDGCNSPIRV-NEXT: [[CMP_NOT_I31_I_I:%.*]] = icmp eq i8 [[TMP7]], 04931// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I31_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I32_I_I]], !llvm.loop [[LOOP14]]4932// AMDGCNSPIRV: [[WHILE_COND_I_I_I]]:4933// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I_I_I:%.*]] = phi ptr addrspace(4) [ [[__TAGP_ADDR_1_I_I_I:%.*]], %[[WHILE_BODY_I_I_I:.*]] ], [ [[INCDEC_PTR_I_I]], %[[IF_THEN_I_I]] ]4934// AMDGCNSPIRV-NEXT: [[__R_0_I_I_I:%.*]] = phi i64 [ [[__R_1_I_I_I:%.*]], %[[WHILE_BODY_I_I_I]] ], [ 0, %[[IF_THEN_I_I]] ]4935// AMDGCNSPIRV-NEXT: [[TMP8:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4936// AMDGCNSPIRV-NEXT: [[CMP_NOT_I_I_I:%.*]] = icmp eq i8 [[TMP8]], 04937// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I_I_I]]4938// AMDGCNSPIRV: [[WHILE_BODY_I_I_I]]:4939// AMDGCNSPIRV-NEXT: [[TMP9:%.*]] = and i8 [[TMP8]], -84940// AMDGCNSPIRV-NEXT: [[OR_COND_I_I_I:%.*]] = icmp eq i8 [[TMP9]], 484941// AMDGCNSPIRV-NEXT: [[MUL_I_I_I:%.*]] = shl i64 [[__R_0_I_I_I]], 34942// AMDGCNSPIRV-NEXT: [[CONV5_I_I_I:%.*]] = zext nneg i8 [[TMP8]] to i644943// AMDGCNSPIRV-NEXT: [[ADD_I_I_I:%.*]] = add i64 [[MUL_I_I_I]], -484944// AMDGCNSPIRV-NEXT: [[SUB_I_I_I:%.*]] = add i64 [[ADD_I_I_I]], [[CONV5_I_I_I]]4945// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_I_I_IDX:%.*]] = zext i1 [[OR_COND_I_I_I]] to i644946// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I_I_I]], i64 [[__TAGP_ADDR_1_I_I_I_IDX]]4947// AMDGCNSPIRV-NEXT: [[__R_1_I_I_I]] = select i1 [[OR_COND_I_I_I]], i64 [[SUB_I_I_I]], i64 [[__R_0_I_I_I]]4948// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I_I_I]], label %[[WHILE_COND_I_I_I]], label %[[_ZL3NANPKC_EXIT]], !llvm.loop [[LOOP10]]4949// AMDGCNSPIRV: [[WHILE_COND_I14_I_I]]:4950// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_0_I15_I_I:%.*]] = phi ptr addrspace(4) [ [[__TAGP_ADDR_1_I25_I_I:%.*]], %[[WHILE_BODY_I18_I_I:.*]] ], [ [[TAG]], %[[ENTRY]] ]4951// AMDGCNSPIRV-NEXT: [[__R_0_I16_I_I:%.*]] = phi i64 [ [[__R_1_I26_I_I:%.*]], %[[WHILE_BODY_I18_I_I]] ], [ 0, %[[ENTRY]] ]4952// AMDGCNSPIRV-NEXT: [[TMP10:%.*]] = load i8, ptr addrspace(4) [[__TAGP_ADDR_0_I15_I_I]], align 1, !tbaa [[CHAR_TBAA9]]4953// AMDGCNSPIRV-NEXT: [[CMP_NOT_I17_I_I:%.*]] = icmp eq i8 [[TMP10]], 04954// AMDGCNSPIRV-NEXT: br i1 [[CMP_NOT_I17_I_I]], label %[[_ZL3NANPKC_EXIT]], label %[[WHILE_BODY_I18_I_I]]4955// AMDGCNSPIRV: [[WHILE_BODY_I18_I_I]]:4956// AMDGCNSPIRV-NEXT: [[TMP11:%.*]] = add i8 [[TMP10]], -484957// AMDGCNSPIRV-NEXT: [[OR_COND_I19_I_I:%.*]] = icmp ult i8 [[TMP11]], 104958// AMDGCNSPIRV-NEXT: [[MUL_I20_I_I:%.*]] = mul i64 [[__R_0_I16_I_I]], 104959// AMDGCNSPIRV-NEXT: [[CONV5_I21_I_I:%.*]] = zext nneg i8 [[TMP10]] to i644960// AMDGCNSPIRV-NEXT: [[ADD_I22_I_I:%.*]] = add i64 [[MUL_I20_I_I]], -484961// AMDGCNSPIRV-NEXT: [[SUB_I23_I_I:%.*]] = add i64 [[ADD_I22_I_I]], [[CONV5_I21_I_I]]4962// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I25_I_I_IDX:%.*]] = zext i1 [[OR_COND_I19_I_I]] to i644963// AMDGCNSPIRV-NEXT: [[__TAGP_ADDR_1_I25_I_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__TAGP_ADDR_0_I15_I_I]], i64 [[__TAGP_ADDR_1_I25_I_I_IDX]]4964// AMDGCNSPIRV-NEXT: [[__R_1_I26_I_I]] = select i1 [[OR_COND_I19_I_I]], i64 [[SUB_I23_I_I]], i64 [[__R_0_I16_I_I]]4965// AMDGCNSPIRV-NEXT: br i1 [[OR_COND_I19_I_I]], label %[[WHILE_COND_I14_I_I]], label %[[_ZL3NANPKC_EXIT]], !llvm.loop [[LOOP13]]4966// AMDGCNSPIRV: [[_ZL3NANPKC_EXIT]]:4967// AMDGCNSPIRV-NEXT: [[RETVAL_0_I_I:%.*]] = phi i64 [ 0, %[[IF_THEN5_I_I]] ], [ 0, %[[WHILE_BODY_I_I_I]] ], [ [[__R_0_I_I_I]], %[[WHILE_COND_I_I_I]] ], [ [[ADD28_I_I_I]], %[[IF_END31_I_I_I]] ], [ 0, %[[IF_ELSE17_I_I_I]] ], [ 0, %[[WHILE_BODY_I18_I_I]] ], [ [[__R_0_I16_I_I]], %[[WHILE_COND_I14_I_I]] ]4968// AMDGCNSPIRV-NEXT: [[BF_VALUE_I:%.*]] = and i64 [[RETVAL_0_I_I]], 22517998136852474969// AMDGCNSPIRV-NEXT: [[BF_SET9_I:%.*]] = or disjoint i64 [[BF_VALUE_I]], 92211202370410905604970// AMDGCNSPIRV-NEXT: [[TMP12:%.*]] = bitcast i64 [[BF_SET9_I]] to double4971// AMDGCNSPIRV-NEXT: ret double [[TMP12]]4972//4973extern "C" __device__ double test_nan(const char *tag) {4974 return nan(tag);4975}4976 4977// DEFAULT-LABEL: define dso_local noundef float @test_nanf_emptystr(4978// DEFAULT-SAME: ) local_unnamed_addr #[[ATTR3]] {4979// DEFAULT-NEXT: [[ENTRY:.*:]]4980// DEFAULT-NEXT: ret float 0x7FF80000000000004981//4982// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_nanf_emptystr(4983// FINITEONLY-SAME: ) local_unnamed_addr #[[ATTR3]] {4984// FINITEONLY-NEXT: [[ENTRY:.*:]]4985// FINITEONLY-NEXT: ret float poison4986//4987// APPROX-LABEL: define dso_local noundef float @test_nanf_emptystr(4988// APPROX-SAME: ) local_unnamed_addr #[[ATTR3]] {4989// APPROX-NEXT: [[ENTRY:.*:]]4990// APPROX-NEXT: ret float 0x7FF80000000000004991//4992// NCRDIV-LABEL: define dso_local noundef float @test_nanf_emptystr(4993// NCRDIV-SAME: ) local_unnamed_addr #[[ATTR3]] {4994// NCRDIV-NEXT: [[ENTRY:.*:]]4995// NCRDIV-NEXT: ret float 0x7FF80000000000004996//4997// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_nanf_emptystr(4998// AMDGCNSPIRV-SAME: ) local_unnamed_addr addrspace(4) #[[ATTR3]] {4999// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5000// AMDGCNSPIRV-NEXT: ret float 0x7FF80000000000005001//5002extern "C" __device__ float test_nanf_emptystr() {5003 return nanf("");5004}5005 5006// DEFAULT-LABEL: define dso_local noundef double @test_nan_emptystr(5007// DEFAULT-SAME: ) local_unnamed_addr #[[ATTR3]] {5008// DEFAULT-NEXT: [[ENTRY:.*:]]5009// DEFAULT-NEXT: ret double 0x7FF80000000000005010//5011// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test_nan_emptystr(5012// FINITEONLY-SAME: ) local_unnamed_addr #[[ATTR3]] {5013// FINITEONLY-NEXT: [[ENTRY:.*:]]5014// FINITEONLY-NEXT: ret double poison5015//5016// APPROX-LABEL: define dso_local noundef double @test_nan_emptystr(5017// APPROX-SAME: ) local_unnamed_addr #[[ATTR3]] {5018// APPROX-NEXT: [[ENTRY:.*:]]5019// APPROX-NEXT: ret double 0x7FF80000000000005020//5021// NCRDIV-LABEL: define dso_local noundef double @test_nan_emptystr(5022// NCRDIV-SAME: ) local_unnamed_addr #[[ATTR3]] {5023// NCRDIV-NEXT: [[ENTRY:.*:]]5024// NCRDIV-NEXT: ret double 0x7FF80000000000005025//5026// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_nan_emptystr(5027// AMDGCNSPIRV-SAME: ) local_unnamed_addr addrspace(4) #[[ATTR3]] {5028// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5029// AMDGCNSPIRV-NEXT: ret double 0x7FF80000000000005030//5031extern "C" __device__ double test_nan_emptystr() {5032 return nan("");5033}5034 5035// DEFAULT-LABEL: define dso_local noundef float @test_nanf_fill(5036// DEFAULT-SAME: ) local_unnamed_addr #[[ATTR3]] {5037// DEFAULT-NEXT: [[ENTRY:.*:]]5038// DEFAULT-NEXT: ret float 0x7FF80000000000005039//5040// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_nanf_fill(5041// FINITEONLY-SAME: ) local_unnamed_addr #[[ATTR3]] {5042// FINITEONLY-NEXT: [[ENTRY:.*:]]5043// FINITEONLY-NEXT: ret float poison5044//5045// APPROX-LABEL: define dso_local noundef float @test_nanf_fill(5046// APPROX-SAME: ) local_unnamed_addr #[[ATTR3]] {5047// APPROX-NEXT: [[ENTRY:.*:]]5048// APPROX-NEXT: ret float 0x7FF80000000000005049//5050// NCRDIV-LABEL: define dso_local noundef float @test_nanf_fill(5051// NCRDIV-SAME: ) local_unnamed_addr #[[ATTR3]] {5052// NCRDIV-NEXT: [[ENTRY:.*:]]5053// NCRDIV-NEXT: ret float 0x7FF80000000000005054//5055// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_nanf_fill(5056// AMDGCNSPIRV-SAME: ) local_unnamed_addr addrspace(4) #[[ATTR3]] {5057// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5058// AMDGCNSPIRV-NEXT: ret float 0x7FF80000000000005059//5060extern "C" __device__ float test_nanf_fill() {5061 return nanf("0x456");5062}5063 5064// DEFAULT-LABEL: define dso_local noundef double @test_nan_fill(5065// DEFAULT-SAME: ) local_unnamed_addr #[[ATTR3]] {5066// DEFAULT-NEXT: [[ENTRY:.*:]]5067// DEFAULT-NEXT: ret double 0x7FF80000000000005068//5069// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test_nan_fill(5070// FINITEONLY-SAME: ) local_unnamed_addr #[[ATTR3]] {5071// FINITEONLY-NEXT: [[ENTRY:.*:]]5072// FINITEONLY-NEXT: ret double poison5073//5074// APPROX-LABEL: define dso_local noundef double @test_nan_fill(5075// APPROX-SAME: ) local_unnamed_addr #[[ATTR3]] {5076// APPROX-NEXT: [[ENTRY:.*:]]5077// APPROX-NEXT: ret double 0x7FF80000000000005078//5079// NCRDIV-LABEL: define dso_local noundef double @test_nan_fill(5080// NCRDIV-SAME: ) local_unnamed_addr #[[ATTR3]] {5081// NCRDIV-NEXT: [[ENTRY:.*:]]5082// NCRDIV-NEXT: ret double 0x7FF80000000000005083//5084// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_nan_fill(5085// AMDGCNSPIRV-SAME: ) local_unnamed_addr addrspace(4) #[[ATTR3]] {5086// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5087// AMDGCNSPIRV-NEXT: ret double 0x7FF80000000000005088//5089extern "C" __device__ double test_nan_fill() {5090 return nan("0x123");5091}5092 5093// DEFAULT-LABEL: define dso_local noundef float @test_nearbyintf(5094// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5095// DEFAULT-NEXT: [[ENTRY:.*:]]5096// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.nearbyint.f32(float [[X]])5097// DEFAULT-NEXT: ret float [[TMP0]]5098//5099// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_nearbyintf(5100// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5101// FINITEONLY-NEXT: [[ENTRY:.*:]]5102// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.nearbyint.f32(float nofpclass(nan inf) [[X]])5103// FINITEONLY-NEXT: ret float [[TMP0]]5104//5105// APPROX-LABEL: define dso_local noundef float @test_nearbyintf(5106// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5107// APPROX-NEXT: [[ENTRY:.*:]]5108// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.nearbyint.f32(float [[X]])5109// APPROX-NEXT: ret float [[TMP0]]5110//5111// NCRDIV-LABEL: define dso_local noundef float @test_nearbyintf(5112// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5113// NCRDIV-NEXT: [[ENTRY:.*:]]5114// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.nearbyint.f32(float [[X]])5115// NCRDIV-NEXT: ret float [[TMP0]]5116//5117// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_nearbyintf(5118// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {5119// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5120// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.nearbyint.f32(float [[X]])5121// AMDGCNSPIRV-NEXT: ret float [[TMP0]]5122//5123extern "C" __device__ float test_nearbyintf(float x) {5124 return nearbyintf(x);5125}5126 5127// DEFAULT-LABEL: define dso_local noundef double @test_nearbyint(5128// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5129// DEFAULT-NEXT: [[ENTRY:.*:]]5130// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.nearbyint.f64(double [[X]])5131// DEFAULT-NEXT: ret double [[TMP0]]5132//5133// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_nearbyint(5134// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5135// FINITEONLY-NEXT: [[ENTRY:.*:]]5136// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.nearbyint.f64(double nofpclass(nan inf) [[X]])5137// FINITEONLY-NEXT: ret double [[TMP0]]5138//5139// APPROX-LABEL: define dso_local noundef double @test_nearbyint(5140// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5141// APPROX-NEXT: [[ENTRY:.*:]]5142// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.nearbyint.f64(double [[X]])5143// APPROX-NEXT: ret double [[TMP0]]5144//5145// NCRDIV-LABEL: define dso_local noundef double @test_nearbyint(5146// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {5147// NCRDIV-NEXT: [[ENTRY:.*:]]5148// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.nearbyint.f64(double [[X]])5149// NCRDIV-NEXT: ret double [[TMP0]]5150//5151// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_nearbyint(5152// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {5153// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5154// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.nearbyint.f64(double [[X]])5155// AMDGCNSPIRV-NEXT: ret double [[TMP0]]5156//5157extern "C" __device__ double test_nearbyint(double x) {5158 return nearbyint(x);5159}5160 5161// DEFAULT-LABEL: define dso_local noundef float @test_nextafterf(5162// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5163// DEFAULT-NEXT: [[ENTRY:.*:]]5164// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_nextafter_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5165// DEFAULT-NEXT: ret float [[CALL_I]]5166//5167// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_nextafterf(5168// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5169// FINITEONLY-NEXT: [[ENTRY:.*:]]5170// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_nextafter_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]5171// FINITEONLY-NEXT: ret float [[CALL_I]]5172//5173// APPROX-LABEL: define dso_local noundef float @test_nextafterf(5174// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5175// APPROX-NEXT: [[ENTRY:.*:]]5176// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_nextafter_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5177// APPROX-NEXT: ret float [[CALL_I]]5178//5179// NCRDIV-LABEL: define dso_local noundef float @test_nextafterf(5180// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5181// NCRDIV-NEXT: [[ENTRY:.*:]]5182// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_nextafter_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5183// NCRDIV-NEXT: ret float [[CALL_I]]5184//5185// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_nextafterf(5186// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5187// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5188// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_nextafter_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5189// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5190//5191extern "C" __device__ float test_nextafterf(float x, float y) {5192 return nextafterf(x, y);5193}5194 5195// DEFAULT-LABEL: define dso_local noundef double @test_nextafter(5196// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5197// DEFAULT-NEXT: [[ENTRY:.*:]]5198// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_nextafter_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5199// DEFAULT-NEXT: ret double [[CALL_I]]5200//5201// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_nextafter(5202// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5203// FINITEONLY-NEXT: [[ENTRY:.*:]]5204// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_nextafter_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]5205// FINITEONLY-NEXT: ret double [[CALL_I]]5206//5207// APPROX-LABEL: define dso_local noundef double @test_nextafter(5208// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5209// APPROX-NEXT: [[ENTRY:.*:]]5210// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_nextafter_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5211// APPROX-NEXT: ret double [[CALL_I]]5212//5213// NCRDIV-LABEL: define dso_local noundef double @test_nextafter(5214// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5215// NCRDIV-NEXT: [[ENTRY:.*:]]5216// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_nextafter_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5217// NCRDIV-NEXT: ret double [[CALL_I]]5218//5219// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_nextafter(5220// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5221// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5222// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_nextafter_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5223// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5224//5225extern "C" __device__ double test_nextafter(double x, double y) {5226 return nextafter(x, y);5227}5228 5229// DEFAULT-LABEL: define dso_local noundef float @test_norm3df(5230// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5231// DEFAULT-NEXT: [[ENTRY:.*:]]5232// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_len3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]5233// DEFAULT-NEXT: ret float [[CALL_I]]5234//5235// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_norm3df(5236// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], float noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5237// FINITEONLY-NEXT: [[ENTRY:.*:]]5238// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_len3_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]], float noundef nofpclass(nan inf) [[Z]]) #[[ATTR12]]5239// FINITEONLY-NEXT: ret float [[CALL_I]]5240//5241// APPROX-LABEL: define dso_local noundef float @test_norm3df(5242// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5243// APPROX-NEXT: [[ENTRY:.*:]]5244// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_len3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]5245// APPROX-NEXT: ret float [[CALL_I]]5246//5247// NCRDIV-LABEL: define dso_local noundef float @test_norm3df(5248// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5249// NCRDIV-NEXT: [[ENTRY:.*:]]5250// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_len3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]5251// NCRDIV-NEXT: ret float [[CALL_I]]5252//5253// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_norm3df(5254// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5255// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5256// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_len3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]5257// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5258//5259extern "C" __device__ float test_norm3df(float x, float y, float z) {5260 return norm3df(x, y, z);5261}5262 5263// DEFAULT-LABEL: define dso_local noundef double @test_norm3d(5264// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5265// DEFAULT-NEXT: [[ENTRY:.*:]]5266// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_len3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]5267// DEFAULT-NEXT: ret double [[CALL_I]]5268//5269// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_norm3d(5270// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5271// FINITEONLY-NEXT: [[ENTRY:.*:]]5272// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_len3_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]], double noundef nofpclass(nan inf) [[Z]]) #[[ATTR12]]5273// FINITEONLY-NEXT: ret double [[CALL_I]]5274//5275// APPROX-LABEL: define dso_local noundef double @test_norm3d(5276// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5277// APPROX-NEXT: [[ENTRY:.*:]]5278// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_len3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]5279// APPROX-NEXT: ret double [[CALL_I]]5280//5281// NCRDIV-LABEL: define dso_local noundef double @test_norm3d(5282// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {5283// NCRDIV-NEXT: [[ENTRY:.*:]]5284// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_len3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]5285// NCRDIV-NEXT: ret double [[CALL_I]]5286//5287// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_norm3d(5288// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5289// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5290// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_len3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]5291// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5292//5293extern "C" __device__ double test_norm3d(double x, double y, double z) {5294 return norm3d(x, y, z);5295}5296 5297// DEFAULT-LABEL: define dso_local noundef float @test_norm4df(5298// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5299// DEFAULT-NEXT: [[ENTRY:.*:]]5300// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_len4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]5301// DEFAULT-NEXT: ret float [[CALL_I]]5302//5303// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_norm4df(5304// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], float noundef nofpclass(nan inf) [[Z:%.*]], float noundef nofpclass(nan inf) [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5305// FINITEONLY-NEXT: [[ENTRY:.*:]]5306// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_len4_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]], float noundef nofpclass(nan inf) [[Z]], float noundef nofpclass(nan inf) [[W]]) #[[ATTR12]]5307// FINITEONLY-NEXT: ret float [[CALL_I]]5308//5309// APPROX-LABEL: define dso_local noundef float @test_norm4df(5310// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5311// APPROX-NEXT: [[ENTRY:.*:]]5312// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_len4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]5313// APPROX-NEXT: ret float [[CALL_I]]5314//5315// NCRDIV-LABEL: define dso_local noundef float @test_norm4df(5316// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5317// NCRDIV-NEXT: [[ENTRY:.*:]]5318// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_len4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]5319// NCRDIV-NEXT: ret float [[CALL_I]]5320//5321// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_norm4df(5322// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5323// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5324// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_len4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]5325// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5326//5327extern "C" __device__ float test_norm4df(float x, float y, float z, float w) {5328 return norm4df(x, y, z, w);5329}5330 5331// DEFAULT-LABEL: define dso_local noundef double @test_norm4d(5332// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5333// DEFAULT-NEXT: [[ENTRY:.*:]]5334// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_len4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]5335// DEFAULT-NEXT: ret double [[CALL_I]]5336//5337// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_norm4d(5338// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]], double noundef nofpclass(nan inf) [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5339// FINITEONLY-NEXT: [[ENTRY:.*:]]5340// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_len4_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]], double noundef nofpclass(nan inf) [[Z]], double noundef nofpclass(nan inf) [[W]]) #[[ATTR12]]5341// FINITEONLY-NEXT: ret double [[CALL_I]]5342//5343// APPROX-LABEL: define dso_local noundef double @test_norm4d(5344// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5345// APPROX-NEXT: [[ENTRY:.*:]]5346// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_len4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]5347// APPROX-NEXT: ret double [[CALL_I]]5348//5349// NCRDIV-LABEL: define dso_local noundef double @test_norm4d(5350// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {5351// NCRDIV-NEXT: [[ENTRY:.*:]]5352// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_len4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]5353// NCRDIV-NEXT: ret double [[CALL_I]]5354//5355// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_norm4d(5356// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5357// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5358// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_len4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]5359// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5360//5361extern "C" __device__ double test_norm4d(double x, double y, double z, double w) {5362 return norm4d(x, y, z, w);5363}5364 5365// DEFAULT-LABEL: define dso_local noundef float @test_normcdff(5366// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5367// DEFAULT-NEXT: [[ENTRY:.*:]]5368// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_ncdf_f32(float noundef [[X]]) #[[ATTR13]]5369// DEFAULT-NEXT: ret float [[CALL_I]]5370//5371// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_normcdff(5372// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5373// FINITEONLY-NEXT: [[ENTRY:.*:]]5374// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_ncdf_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]5375// FINITEONLY-NEXT: ret float [[CALL_I]]5376//5377// APPROX-LABEL: define dso_local noundef float @test_normcdff(5378// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5379// APPROX-NEXT: [[ENTRY:.*:]]5380// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_ncdf_f32(float noundef [[X]]) #[[ATTR13]]5381// APPROX-NEXT: ret float [[CALL_I]]5382//5383// NCRDIV-LABEL: define dso_local noundef float @test_normcdff(5384// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5385// NCRDIV-NEXT: [[ENTRY:.*:]]5386// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_ncdf_f32(float noundef [[X]]) #[[ATTR13]]5387// NCRDIV-NEXT: ret float [[CALL_I]]5388//5389// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_normcdff(5390// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5391// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5392// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_ncdf_f32(float noundef [[X]]) #[[ATTR13]]5393// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5394//5395extern "C" __device__ float test_normcdff(float x) {5396 return normcdff(x);5397}5398 5399// DEFAULT-LABEL: define dso_local noundef double @test_normcdf(5400// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5401// DEFAULT-NEXT: [[ENTRY:.*:]]5402// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_ncdf_f64(double noundef [[X]]) #[[ATTR13]]5403// DEFAULT-NEXT: ret double [[CALL_I]]5404//5405// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_normcdf(5406// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5407// FINITEONLY-NEXT: [[ENTRY:.*:]]5408// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_ncdf_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]5409// FINITEONLY-NEXT: ret double [[CALL_I]]5410//5411// APPROX-LABEL: define dso_local noundef double @test_normcdf(5412// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5413// APPROX-NEXT: [[ENTRY:.*:]]5414// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_ncdf_f64(double noundef [[X]]) #[[ATTR13]]5415// APPROX-NEXT: ret double [[CALL_I]]5416//5417// NCRDIV-LABEL: define dso_local noundef double @test_normcdf(5418// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5419// NCRDIV-NEXT: [[ENTRY:.*:]]5420// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_ncdf_f64(double noundef [[X]]) #[[ATTR13]]5421// NCRDIV-NEXT: ret double [[CALL_I]]5422//5423// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_normcdf(5424// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5425// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5426// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_ncdf_f64(double noundef [[X]]) #[[ATTR13]]5427// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5428//5429extern "C" __device__ double test_normcdf(double x) {5430 return normcdf(x);5431}5432 5433// DEFAULT-LABEL: define dso_local noundef float @test_normcdfinvf(5434// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5435// DEFAULT-NEXT: [[ENTRY:.*:]]5436// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_ncdfinv_f32(float noundef [[X]]) #[[ATTR13]]5437// DEFAULT-NEXT: ret float [[CALL_I]]5438//5439// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_normcdfinvf(5440// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5441// FINITEONLY-NEXT: [[ENTRY:.*:]]5442// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_ncdfinv_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]5443// FINITEONLY-NEXT: ret float [[CALL_I]]5444//5445// APPROX-LABEL: define dso_local noundef float @test_normcdfinvf(5446// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5447// APPROX-NEXT: [[ENTRY:.*:]]5448// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_ncdfinv_f32(float noundef [[X]]) #[[ATTR13]]5449// APPROX-NEXT: ret float [[CALL_I]]5450//5451// NCRDIV-LABEL: define dso_local noundef float @test_normcdfinvf(5452// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5453// NCRDIV-NEXT: [[ENTRY:.*:]]5454// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_ncdfinv_f32(float noundef [[X]]) #[[ATTR13]]5455// NCRDIV-NEXT: ret float [[CALL_I]]5456//5457// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_normcdfinvf(5458// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5459// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5460// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_ncdfinv_f32(float noundef [[X]]) #[[ATTR13]]5461// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5462//5463extern "C" __device__ float test_normcdfinvf(float x) {5464 return normcdfinvf(x);5465}5466 5467// DEFAULT-LABEL: define dso_local noundef double @test_normcdfinv(5468// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5469// DEFAULT-NEXT: [[ENTRY:.*:]]5470// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_ncdfinv_f64(double noundef [[X]]) #[[ATTR13]]5471// DEFAULT-NEXT: ret double [[CALL_I]]5472//5473// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_normcdfinv(5474// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5475// FINITEONLY-NEXT: [[ENTRY:.*:]]5476// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_ncdfinv_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]5477// FINITEONLY-NEXT: ret double [[CALL_I]]5478//5479// APPROX-LABEL: define dso_local noundef double @test_normcdfinv(5480// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5481// APPROX-NEXT: [[ENTRY:.*:]]5482// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_ncdfinv_f64(double noundef [[X]]) #[[ATTR13]]5483// APPROX-NEXT: ret double [[CALL_I]]5484//5485// NCRDIV-LABEL: define dso_local noundef double @test_normcdfinv(5486// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5487// NCRDIV-NEXT: [[ENTRY:.*:]]5488// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_ncdfinv_f64(double noundef [[X]]) #[[ATTR13]]5489// NCRDIV-NEXT: ret double [[CALL_I]]5490//5491// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_normcdfinv(5492// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5493// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5494// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_ncdfinv_f64(double noundef [[X]]) #[[ATTR13]]5495// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5496//5497extern "C" __device__ double test_normcdfinv(double x) {5498 return normcdfinv(x);5499}5500 5501// DEFAULT-LABEL: define dso_local float @test_normf(5502// DEFAULT-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5503// DEFAULT-NEXT: [[ENTRY:.*]]:5504// DEFAULT-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05505// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5NORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5506// DEFAULT: [[WHILE_BODY_I]]:5507// DEFAULT-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5508// DEFAULT-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5509// DEFAULT-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5510// DEFAULT-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15511// DEFAULT-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA16]]5512// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]5513// DEFAULT-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]5514// DEFAULT-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 45515// DEFAULT-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05516// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP20:![0-9]+]]5517// DEFAULT: [[_ZL5NORMFIPKF_EXIT_LOOPEXIT]]:5518// DEFAULT-NEXT: [[TMP1:%.*]] = tail call contract float @llvm.sqrt.f32(float [[ADD_I]])5519// DEFAULT-NEXT: br label %[[_ZL5NORMFIPKF_EXIT]]5520// DEFAULT: [[_ZL5NORMFIPKF_EXIT]]:5521// DEFAULT-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT]] ]5522// DEFAULT-NEXT: ret float [[__R_0_I_LCSSA]]5523//5524// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_normf(5525// FINITEONLY-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5526// FINITEONLY-NEXT: [[ENTRY:.*]]:5527// FINITEONLY-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05528// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5NORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5529// FINITEONLY: [[WHILE_BODY_I]]:5530// FINITEONLY-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5531// FINITEONLY-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5532// FINITEONLY-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5533// FINITEONLY-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15534// FINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA16]]5535// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract float [[TMP0]], [[TMP0]]5536// FINITEONLY-NEXT: [[ADD_I]] = fadd nnan ninf contract float [[__R_0_I4]], [[MUL_I]]5537// FINITEONLY-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 45538// FINITEONLY-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05539// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP20:![0-9]+]]5540// FINITEONLY: [[_ZL5NORMFIPKF_EXIT_LOOPEXIT]]:5541// FINITEONLY-NEXT: [[TMP1:%.*]] = tail call nnan ninf contract float @llvm.sqrt.f32(float [[ADD_I]])5542// FINITEONLY-NEXT: br label %[[_ZL5NORMFIPKF_EXIT]]5543// FINITEONLY: [[_ZL5NORMFIPKF_EXIT]]:5544// FINITEONLY-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT]] ]5545// FINITEONLY-NEXT: ret float [[__R_0_I_LCSSA]]5546//5547// APPROX-LABEL: define dso_local float @test_normf(5548// APPROX-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5549// APPROX-NEXT: [[ENTRY:.*]]:5550// APPROX-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05551// APPROX-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5NORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5552// APPROX: [[WHILE_BODY_I]]:5553// APPROX-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5554// APPROX-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5555// APPROX-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5556// APPROX-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15557// APPROX-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA16]]5558// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]5559// APPROX-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]5560// APPROX-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 45561// APPROX-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05562// APPROX-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP20:![0-9]+]]5563// APPROX: [[_ZL5NORMFIPKF_EXIT_LOOPEXIT]]:5564// APPROX-NEXT: [[TMP1:%.*]] = tail call contract float @llvm.sqrt.f32(float [[ADD_I]])5565// APPROX-NEXT: br label %[[_ZL5NORMFIPKF_EXIT]]5566// APPROX: [[_ZL5NORMFIPKF_EXIT]]:5567// APPROX-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT]] ]5568// APPROX-NEXT: ret float [[__R_0_I_LCSSA]]5569//5570// NCRDIV-LABEL: define dso_local float @test_normf(5571// NCRDIV-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5572// NCRDIV-NEXT: [[ENTRY:.*]]:5573// NCRDIV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05574// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5NORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5575// NCRDIV: [[WHILE_BODY_I]]:5576// NCRDIV-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5577// NCRDIV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5578// NCRDIV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5579// NCRDIV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15580// NCRDIV-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA17]]5581// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]5582// NCRDIV-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]5583// NCRDIV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 45584// NCRDIV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05585// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP21:![0-9]+]]5586// NCRDIV: [[_ZL5NORMFIPKF_EXIT_LOOPEXIT]]:5587// NCRDIV-NEXT: [[TMP1:%.*]] = tail call contract float @llvm.sqrt.f32(float [[ADD_I]])5588// NCRDIV-NEXT: br label %[[_ZL5NORMFIPKF_EXIT]]5589// NCRDIV: [[_ZL5NORMFIPKF_EXIT]]:5590// NCRDIV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT]] ]5591// NCRDIV-NEXT: ret float [[__R_0_I_LCSSA]]5592//5593// AMDGCNSPIRV-LABEL: define spir_func float @test_normf(5594// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], ptr addrspace(4) noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {5595// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:5596// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05597// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5NORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5598// AMDGCNSPIRV: [[WHILE_BODY_I]]:5599// AMDGCNSPIRV-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5600// AMDGCNSPIRV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5601// AMDGCNSPIRV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5602// AMDGCNSPIRV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15603// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(4) [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA17]]5604// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]5605// AMDGCNSPIRV-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]5606// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__A_ADDR_0_I3]], i64 45607// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05608// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP21:![0-9]+]]5609// AMDGCNSPIRV: [[_ZL5NORMFIPKF_EXIT_LOOPEXIT]]:5610// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = tail call contract addrspace(4) float @llvm.sqrt.f32(float [[ADD_I]])5611// AMDGCNSPIRV-NEXT: br label %[[_ZL5NORMFIPKF_EXIT]]5612// AMDGCNSPIRV: [[_ZL5NORMFIPKF_EXIT]]:5613// AMDGCNSPIRV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL5NORMFIPKF_EXIT_LOOPEXIT]] ]5614// AMDGCNSPIRV-NEXT: ret float [[__R_0_I_LCSSA]]5615//5616extern "C" __device__ float test_normf(int x, const float *y) {5617 return normf(x, y);5618}5619 5620// DEFAULT-LABEL: define dso_local double @test_norm(5621// DEFAULT-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5622// DEFAULT-NEXT: [[ENTRY:.*]]:5623// DEFAULT-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05624// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL4NORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5625// DEFAULT: [[WHILE_BODY_I]]:5626// DEFAULT-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5627// DEFAULT-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5628// DEFAULT-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5629// DEFAULT-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15630// DEFAULT-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA18]]5631// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]5632// DEFAULT-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]5633// DEFAULT-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 85634// DEFAULT-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05635// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL4NORMIPKD_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP21:![0-9]+]]5636// DEFAULT: [[_ZL4NORMIPKD_EXIT_LOOPEXIT]]:5637// DEFAULT-NEXT: [[TMP1:%.*]] = tail call contract double @llvm.sqrt.f64(double [[ADD_I]])5638// DEFAULT-NEXT: br label %[[_ZL4NORMIPKD_EXIT]]5639// DEFAULT: [[_ZL4NORMIPKD_EXIT]]:5640// DEFAULT-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL4NORMIPKD_EXIT_LOOPEXIT]] ]5641// DEFAULT-NEXT: ret double [[__R_0_I_LCSSA]]5642//5643// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test_norm(5644// FINITEONLY-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5645// FINITEONLY-NEXT: [[ENTRY:.*]]:5646// FINITEONLY-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05647// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL4NORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5648// FINITEONLY: [[WHILE_BODY_I]]:5649// FINITEONLY-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5650// FINITEONLY-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5651// FINITEONLY-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5652// FINITEONLY-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15653// FINITEONLY-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA18]]5654// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract double [[TMP0]], [[TMP0]]5655// FINITEONLY-NEXT: [[ADD_I]] = fadd nnan ninf contract double [[__R_0_I4]], [[MUL_I]]5656// FINITEONLY-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 85657// FINITEONLY-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05658// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL4NORMIPKD_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP21:![0-9]+]]5659// FINITEONLY: [[_ZL4NORMIPKD_EXIT_LOOPEXIT]]:5660// FINITEONLY-NEXT: [[TMP1:%.*]] = tail call nnan ninf contract double @llvm.sqrt.f64(double [[ADD_I]])5661// FINITEONLY-NEXT: br label %[[_ZL4NORMIPKD_EXIT]]5662// FINITEONLY: [[_ZL4NORMIPKD_EXIT]]:5663// FINITEONLY-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL4NORMIPKD_EXIT_LOOPEXIT]] ]5664// FINITEONLY-NEXT: ret double [[__R_0_I_LCSSA]]5665//5666// APPROX-LABEL: define dso_local double @test_norm(5667// APPROX-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5668// APPROX-NEXT: [[ENTRY:.*]]:5669// APPROX-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05670// APPROX-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL4NORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5671// APPROX: [[WHILE_BODY_I]]:5672// APPROX-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5673// APPROX-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5674// APPROX-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5675// APPROX-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15676// APPROX-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA18]]5677// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]5678// APPROX-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]5679// APPROX-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 85680// APPROX-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05681// APPROX-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL4NORMIPKD_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP21:![0-9]+]]5682// APPROX: [[_ZL4NORMIPKD_EXIT_LOOPEXIT]]:5683// APPROX-NEXT: [[TMP1:%.*]] = tail call contract double @llvm.sqrt.f64(double [[ADD_I]])5684// APPROX-NEXT: br label %[[_ZL4NORMIPKD_EXIT]]5685// APPROX: [[_ZL4NORMIPKD_EXIT]]:5686// APPROX-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL4NORMIPKD_EXIT_LOOPEXIT]] ]5687// APPROX-NEXT: ret double [[__R_0_I_LCSSA]]5688//5689// NCRDIV-LABEL: define dso_local double @test_norm(5690// NCRDIV-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR2]] {5691// NCRDIV-NEXT: [[ENTRY:.*]]:5692// NCRDIV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05693// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL4NORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5694// NCRDIV: [[WHILE_BODY_I]]:5695// NCRDIV-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5696// NCRDIV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5697// NCRDIV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5698// NCRDIV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15699// NCRDIV-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA19]]5700// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]5701// NCRDIV-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]5702// NCRDIV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 85703// NCRDIV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05704// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL4NORMIPKD_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP22:![0-9]+]]5705// NCRDIV: [[_ZL4NORMIPKD_EXIT_LOOPEXIT]]:5706// NCRDIV-NEXT: [[TMP1:%.*]] = tail call contract double @llvm.sqrt.f64(double [[ADD_I]])5707// NCRDIV-NEXT: br label %[[_ZL4NORMIPKD_EXIT]]5708// NCRDIV: [[_ZL4NORMIPKD_EXIT]]:5709// NCRDIV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL4NORMIPKD_EXIT_LOOPEXIT]] ]5710// NCRDIV-NEXT: ret double [[__R_0_I_LCSSA]]5711//5712// AMDGCNSPIRV-LABEL: define spir_func double @test_norm(5713// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], ptr addrspace(4) noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR2]] {5714// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:5715// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 05716// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL4NORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]5717// AMDGCNSPIRV: [[WHILE_BODY_I]]:5718// AMDGCNSPIRV-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]5719// AMDGCNSPIRV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]5720// AMDGCNSPIRV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]5721// AMDGCNSPIRV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -15722// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(4) [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA19]]5723// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]5724// AMDGCNSPIRV-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]5725// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__A_ADDR_0_I3]], i64 85726// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 05727// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL4NORMIPKD_EXIT_LOOPEXIT:.*]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP22:![0-9]+]]5728// AMDGCNSPIRV: [[_ZL4NORMIPKD_EXIT_LOOPEXIT]]:5729// AMDGCNSPIRV-NEXT: [[TMP1:%.*]] = tail call contract addrspace(4) double @llvm.sqrt.f64(double [[ADD_I]])5730// AMDGCNSPIRV-NEXT: br label %[[_ZL4NORMIPKD_EXIT]]5731// AMDGCNSPIRV: [[_ZL4NORMIPKD_EXIT]]:5732// AMDGCNSPIRV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[TMP1]], %[[_ZL4NORMIPKD_EXIT_LOOPEXIT]] ]5733// AMDGCNSPIRV-NEXT: ret double [[__R_0_I_LCSSA]]5734//5735extern "C" __device__ double test_norm(int x, const double *y) {5736 return norm(x, y);5737}5738 5739// DEFAULT-LABEL: define dso_local noundef float @test_powf(5740// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5741// DEFAULT-NEXT: [[ENTRY:.*:]]5742// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]5743// DEFAULT-NEXT: ret float [[CALL_I]]5744//5745// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_powf(5746// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5747// FINITEONLY-NEXT: [[ENTRY:.*:]]5748// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_pow_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR13]]5749// FINITEONLY-NEXT: ret float [[CALL_I]]5750//5751// APPROX-LABEL: define dso_local noundef float @test_powf(5752// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5753// APPROX-NEXT: [[ENTRY:.*:]]5754// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]5755// APPROX-NEXT: ret float [[CALL_I]]5756//5757// NCRDIV-LABEL: define dso_local noundef float @test_powf(5758// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5759// NCRDIV-NEXT: [[ENTRY:.*:]]5760// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]5761// NCRDIV-NEXT: ret float [[CALL_I]]5762//5763// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_powf(5764// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5765// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5766// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]5767// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5768//5769extern "C" __device__ float test_powf(float x, float y) {5770 return powf(x, y);5771}5772 5773// DEFAULT-LABEL: define dso_local noundef double @test_pow(5774// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5775// DEFAULT-NEXT: [[ENTRY:.*:]]5776// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_pow_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR13]]5777// DEFAULT-NEXT: ret double [[CALL_I]]5778//5779// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_pow(5780// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5781// FINITEONLY-NEXT: [[ENTRY:.*:]]5782// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_pow_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR13]]5783// FINITEONLY-NEXT: ret double [[CALL_I]]5784//5785// APPROX-LABEL: define dso_local noundef double @test_pow(5786// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5787// APPROX-NEXT: [[ENTRY:.*:]]5788// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_pow_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR13]]5789// APPROX-NEXT: ret double [[CALL_I]]5790//5791// NCRDIV-LABEL: define dso_local noundef double @test_pow(5792// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5793// NCRDIV-NEXT: [[ENTRY:.*:]]5794// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_pow_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR13]]5795// NCRDIV-NEXT: ret double [[CALL_I]]5796//5797// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_pow(5798// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5799// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5800// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_pow_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR13]]5801// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5802//5803extern "C" __device__ double test_pow(double x, double y) {5804 return pow(x, y);5805}5806 5807// DEFAULT-LABEL: define dso_local noundef float @test_powif(5808// DEFAULT-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5809// DEFAULT-NEXT: [[ENTRY:.*:]]5810// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pown_f32(float noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5811// DEFAULT-NEXT: ret float [[CALL_I]]5812//5813// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_powif(5814// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5815// FINITEONLY-NEXT: [[ENTRY:.*:]]5816// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_pown_f32(float noundef nofpclass(nan inf) [[X]], i32 noundef [[Y]]) #[[ATTR13]]5817// FINITEONLY-NEXT: ret float [[CALL_I]]5818//5819// APPROX-LABEL: define dso_local noundef float @test_powif(5820// APPROX-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5821// APPROX-NEXT: [[ENTRY:.*:]]5822// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pown_f32(float noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5823// APPROX-NEXT: ret float [[CALL_I]]5824//5825// NCRDIV-LABEL: define dso_local noundef float @test_powif(5826// NCRDIV-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5827// NCRDIV-NEXT: [[ENTRY:.*:]]5828// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pown_f32(float noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5829// NCRDIV-NEXT: ret float [[CALL_I]]5830//5831// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_powif(5832// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5833// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5834// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_pown_f32(float noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5835// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5836//5837extern "C" __device__ float test_powif(float x, int y) {5838 return powif(x, y);5839}5840 5841// DEFAULT-LABEL: define dso_local noundef double @test_powi(5842// DEFAULT-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5843// DEFAULT-NEXT: [[ENTRY:.*:]]5844// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_pown_f64(double noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5845// DEFAULT-NEXT: ret double [[CALL_I]]5846//5847// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_powi(5848// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5849// FINITEONLY-NEXT: [[ENTRY:.*:]]5850// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_pown_f64(double noundef nofpclass(nan inf) [[X]], i32 noundef [[Y]]) #[[ATTR13]]5851// FINITEONLY-NEXT: ret double [[CALL_I]]5852//5853// APPROX-LABEL: define dso_local noundef double @test_powi(5854// APPROX-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5855// APPROX-NEXT: [[ENTRY:.*:]]5856// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_pown_f64(double noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5857// APPROX-NEXT: ret double [[CALL_I]]5858//5859// NCRDIV-LABEL: define dso_local noundef double @test_powi(5860// NCRDIV-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {5861// NCRDIV-NEXT: [[ENTRY:.*:]]5862// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_pown_f64(double noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5863// NCRDIV-NEXT: ret double [[CALL_I]]5864//5865// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_powi(5866// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5867// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5868// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_pown_f64(double noundef [[X]], i32 noundef [[Y]]) #[[ATTR13]]5869// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5870//5871extern "C" __device__ double test_powi(double x, int y) {5872 return powi(x, y);5873}5874 5875// DEFAULT-LABEL: define dso_local noundef float @test_rcbrtf(5876// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5877// DEFAULT-NEXT: [[ENTRY:.*:]]5878// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rcbrt_f32(float noundef [[X]]) #[[ATTR13]]5879// DEFAULT-NEXT: ret float [[CALL_I]]5880//5881// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rcbrtf(5882// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5883// FINITEONLY-NEXT: [[ENTRY:.*:]]5884// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_rcbrt_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]5885// FINITEONLY-NEXT: ret float [[CALL_I]]5886//5887// APPROX-LABEL: define dso_local noundef float @test_rcbrtf(5888// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5889// APPROX-NEXT: [[ENTRY:.*:]]5890// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rcbrt_f32(float noundef [[X]]) #[[ATTR13]]5891// APPROX-NEXT: ret float [[CALL_I]]5892//5893// NCRDIV-LABEL: define dso_local noundef float @test_rcbrtf(5894// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5895// NCRDIV-NEXT: [[ENTRY:.*:]]5896// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rcbrt_f32(float noundef [[X]]) #[[ATTR13]]5897// NCRDIV-NEXT: ret float [[CALL_I]]5898//5899// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rcbrtf(5900// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5901// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5902// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_rcbrt_f32(float noundef [[X]]) #[[ATTR13]]5903// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5904//5905extern "C" __device__ float test_rcbrtf(float x) {5906 return rcbrtf(x);5907}5908 5909// DEFAULT-LABEL: define dso_local noundef double @test_rcbrt(5910// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5911// DEFAULT-NEXT: [[ENTRY:.*:]]5912// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rcbrt_f64(double noundef [[X]]) #[[ATTR13]]5913// DEFAULT-NEXT: ret double [[CALL_I]]5914//5915// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rcbrt(5916// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5917// FINITEONLY-NEXT: [[ENTRY:.*:]]5918// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_rcbrt_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]5919// FINITEONLY-NEXT: ret double [[CALL_I]]5920//5921// APPROX-LABEL: define dso_local noundef double @test_rcbrt(5922// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5923// APPROX-NEXT: [[ENTRY:.*:]]5924// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rcbrt_f64(double noundef [[X]]) #[[ATTR13]]5925// APPROX-NEXT: ret double [[CALL_I]]5926//5927// NCRDIV-LABEL: define dso_local noundef double @test_rcbrt(5928// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {5929// NCRDIV-NEXT: [[ENTRY:.*:]]5930// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rcbrt_f64(double noundef [[X]]) #[[ATTR13]]5931// NCRDIV-NEXT: ret double [[CALL_I]]5932//5933// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rcbrt(5934// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {5935// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5936// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_rcbrt_f64(double noundef [[X]]) #[[ATTR13]]5937// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]5938//5939extern "C" __device__ double test_rcbrt(double x) {5940 return rcbrt(x);5941}5942 5943// DEFAULT-LABEL: define dso_local noundef float @test_remainderf(5944// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5945// DEFAULT-NEXT: [[ENTRY:.*:]]5946// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_remainder_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5947// DEFAULT-NEXT: ret float [[CALL_I]]5948//5949// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_remainderf(5950// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5951// FINITEONLY-NEXT: [[ENTRY:.*:]]5952// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_remainder_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]5953// FINITEONLY-NEXT: ret float [[CALL_I]]5954//5955// APPROX-LABEL: define dso_local noundef float @test_remainderf(5956// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5957// APPROX-NEXT: [[ENTRY:.*:]]5958// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_remainder_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5959// APPROX-NEXT: ret float [[CALL_I]]5960//5961// NCRDIV-LABEL: define dso_local noundef float @test_remainderf(5962// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5963// NCRDIV-NEXT: [[ENTRY:.*:]]5964// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_remainder_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5965// NCRDIV-NEXT: ret float [[CALL_I]]5966//5967// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_remainderf(5968// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {5969// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]5970// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_remainder_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]5971// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]5972//5973extern "C" __device__ float test_remainderf(float x, float y) {5974 return remainderf(x, y);5975}5976 5977// DEFAULT-LABEL: define dso_local noundef double @test_remainder(5978// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5979// DEFAULT-NEXT: [[ENTRY:.*:]]5980// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_remainder_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5981// DEFAULT-NEXT: ret double [[CALL_I]]5982//5983// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_remainder(5984// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5985// FINITEONLY-NEXT: [[ENTRY:.*:]]5986// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_remainder_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]5987// FINITEONLY-NEXT: ret double [[CALL_I]]5988//5989// APPROX-LABEL: define dso_local noundef double @test_remainder(5990// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5991// APPROX-NEXT: [[ENTRY:.*:]]5992// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_remainder_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5993// APPROX-NEXT: ret double [[CALL_I]]5994//5995// NCRDIV-LABEL: define dso_local noundef double @test_remainder(5996// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {5997// NCRDIV-NEXT: [[ENTRY:.*:]]5998// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_remainder_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]5999// NCRDIV-NEXT: ret double [[CALL_I]]6000//6001// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_remainder(6002// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6003// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6004// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_remainder_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]6005// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6006//6007extern "C" __device__ double test_remainder(double x, double y) {6008 return remainder(x, y);6009}6010 6011// DEFAULT-LABEL: define dso_local noundef float @test_remquof(6012// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6013// DEFAULT-NEXT: [[ENTRY:.*:]]6014// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6015// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6016// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract noundef float @__ocml_remquo_f32(float noundef [[X]], float noundef [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6017// DEFAULT-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6018// DEFAULT-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6019// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6020// DEFAULT-NEXT: ret float [[CALL_I]]6021//6022// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_remquof(6023// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6024// FINITEONLY-NEXT: [[ENTRY:.*:]]6025// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6026// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6027// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_remquo_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6028// FINITEONLY-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6029// FINITEONLY-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6030// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6031// FINITEONLY-NEXT: ret float [[CALL_I]]6032//6033// APPROX-LABEL: define dso_local noundef float @test_remquof(6034// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6035// APPROX-NEXT: [[ENTRY:.*:]]6036// APPROX-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6037// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6038// APPROX-NEXT: [[CALL_I:%.*]] = call contract noundef float @__ocml_remquo_f32(float noundef [[X]], float noundef [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6039// APPROX-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6040// APPROX-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6041// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6042// APPROX-NEXT: ret float [[CALL_I]]6043//6044// NCRDIV-LABEL: define dso_local noundef float @test_remquof(6045// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6046// NCRDIV-NEXT: [[ENTRY:.*:]]6047// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6048// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6049// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract noundef float @__ocml_remquo_f32(float noundef [[X]], float noundef [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6050// NCRDIV-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6051// NCRDIV-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6052// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6053// NCRDIV-NEXT: ret float [[CALL_I]]6054//6055// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_remquof(6056// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {6057// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6058// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca i32, align 46059// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)6060// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]6061// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func noundef addrspace(4) float @__ocml_remquo_f32(float noundef [[X]], float noundef [[Y]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]6062// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(4) [[__TMP_ASCAST_I]], align 4, !tbaa [[INT_TBAA5]]6063// AMDGCNSPIRV-NEXT: store i32 [[TMP0]], ptr addrspace(4) [[Z]], align 4, !tbaa [[INT_TBAA5]]6064// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]6065// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]6066//6067extern "C" __device__ float test_remquof(float x, float y, int* z) {6068 return remquof(x, y, z);6069}6070 6071// DEFAULT-LABEL: define dso_local noundef double @test_remquo(6072// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6073// DEFAULT-NEXT: [[ENTRY:.*:]]6074// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6075// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6076// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract noundef double @__ocml_remquo_f64(double noundef [[X]], double noundef [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6077// DEFAULT-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6078// DEFAULT-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6079// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6080// DEFAULT-NEXT: ret double [[CALL_I]]6081//6082// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_remquo(6083// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6084// FINITEONLY-NEXT: [[ENTRY:.*:]]6085// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6086// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6087// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_remquo_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6088// FINITEONLY-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6089// FINITEONLY-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6090// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6091// FINITEONLY-NEXT: ret double [[CALL_I]]6092//6093// APPROX-LABEL: define dso_local noundef double @test_remquo(6094// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6095// APPROX-NEXT: [[ENTRY:.*:]]6096// APPROX-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6097// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6098// APPROX-NEXT: [[CALL_I:%.*]] = call contract noundef double @__ocml_remquo_f64(double noundef [[X]], double noundef [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6099// APPROX-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6100// APPROX-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6101// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6102// APPROX-NEXT: ret double [[CALL_I]]6103//6104// NCRDIV-LABEL: define dso_local noundef double @test_remquo(6105// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6106// NCRDIV-NEXT: [[ENTRY:.*:]]6107// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca i32, align 4, addrspace(5)6108// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6109// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract noundef double @__ocml_remquo_f64(double noundef [[X]], double noundef [[Y]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]6110// NCRDIV-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[INT_TBAA4]]6111// NCRDIV-NEXT: store i32 [[TMP0]], ptr [[Z]], align 4, !tbaa [[INT_TBAA4]]6112// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]6113// NCRDIV-NEXT: ret double [[CALL_I]]6114//6115// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_remquo(6116// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {6117// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6118// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca i32, align 46119// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)6120// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]6121// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func noundef addrspace(4) double @__ocml_remquo_f64(double noundef [[X]], double noundef [[Y]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]6122// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(4) [[__TMP_ASCAST_I]], align 4, !tbaa [[INT_TBAA5]]6123// AMDGCNSPIRV-NEXT: store i32 [[TMP0]], ptr addrspace(4) [[Z]], align 4, !tbaa [[INT_TBAA5]]6124// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]6125// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6126//6127extern "C" __device__ double test_remquo(double x, double y, int* z) {6128 return remquo(x, y, z);6129}6130 6131// DEFAULT-LABEL: define dso_local noundef float @test_rhypotf(6132// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6133// DEFAULT-NEXT: [[ENTRY:.*:]]6134// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rhypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]6135// DEFAULT-NEXT: ret float [[CALL_I]]6136//6137// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rhypotf(6138// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6139// FINITEONLY-NEXT: [[ENTRY:.*:]]6140// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_rhypot_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]6141// FINITEONLY-NEXT: ret float [[CALL_I]]6142//6143// APPROX-LABEL: define dso_local noundef float @test_rhypotf(6144// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6145// APPROX-NEXT: [[ENTRY:.*:]]6146// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rhypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]6147// APPROX-NEXT: ret float [[CALL_I]]6148//6149// NCRDIV-LABEL: define dso_local noundef float @test_rhypotf(6150// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6151// NCRDIV-NEXT: [[ENTRY:.*:]]6152// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rhypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]6153// NCRDIV-NEXT: ret float [[CALL_I]]6154//6155// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rhypotf(6156// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6157// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6158// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_rhypot_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR12]]6159// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]6160//6161extern "C" __device__ float test_rhypotf(float x, float y) {6162 return rhypotf(x, y);6163}6164 6165// DEFAULT-LABEL: define dso_local noundef double @test_rhypot(6166// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6167// DEFAULT-NEXT: [[ENTRY:.*:]]6168// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rhypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]6169// DEFAULT-NEXT: ret double [[CALL_I]]6170//6171// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rhypot(6172// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6173// FINITEONLY-NEXT: [[ENTRY:.*:]]6174// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_rhypot_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]]) #[[ATTR12]]6175// FINITEONLY-NEXT: ret double [[CALL_I]]6176//6177// APPROX-LABEL: define dso_local noundef double @test_rhypot(6178// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6179// APPROX-NEXT: [[ENTRY:.*:]]6180// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rhypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]6181// APPROX-NEXT: ret double [[CALL_I]]6182//6183// NCRDIV-LABEL: define dso_local noundef double @test_rhypot(6184// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR4]] {6185// NCRDIV-NEXT: [[ENTRY:.*:]]6186// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rhypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]6187// NCRDIV-NEXT: ret double [[CALL_I]]6188//6189// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rhypot(6190// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6191// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6192// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_rhypot_f64(double noundef [[X]], double noundef [[Y]]) #[[ATTR12]]6193// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6194//6195extern "C" __device__ double test_rhypot(double x, double y) {6196 return rhypot(x, y);6197}6198 6199// DEFAULT-LABEL: define dso_local noundef float @test_rintf(6200// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6201// DEFAULT-NEXT: [[ENTRY:.*:]]6202// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.rint.f32(float [[X]])6203// DEFAULT-NEXT: ret float [[TMP0]]6204//6205// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rintf(6206// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6207// FINITEONLY-NEXT: [[ENTRY:.*:]]6208// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.rint.f32(float nofpclass(nan inf) [[X]])6209// FINITEONLY-NEXT: ret float [[TMP0]]6210//6211// APPROX-LABEL: define dso_local noundef float @test_rintf(6212// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6213// APPROX-NEXT: [[ENTRY:.*:]]6214// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.rint.f32(float [[X]])6215// APPROX-NEXT: ret float [[TMP0]]6216//6217// NCRDIV-LABEL: define dso_local noundef float @test_rintf(6218// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6219// NCRDIV-NEXT: [[ENTRY:.*:]]6220// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.rint.f32(float [[X]])6221// NCRDIV-NEXT: ret float [[TMP0]]6222//6223// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rintf(6224// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6225// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6226// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.rint.f32(float [[X]])6227// AMDGCNSPIRV-NEXT: ret float [[TMP0]]6228//6229extern "C" __device__ float test_rintf(float x) {6230 return rintf(x);6231}6232 6233// DEFAULT-LABEL: define dso_local noundef double @test_rint(6234// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6235// DEFAULT-NEXT: [[ENTRY:.*:]]6236// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.rint.f64(double [[X]])6237// DEFAULT-NEXT: ret double [[TMP0]]6238//6239// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rint(6240// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6241// FINITEONLY-NEXT: [[ENTRY:.*:]]6242// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.rint.f64(double nofpclass(nan inf) [[X]])6243// FINITEONLY-NEXT: ret double [[TMP0]]6244//6245// APPROX-LABEL: define dso_local noundef double @test_rint(6246// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6247// APPROX-NEXT: [[ENTRY:.*:]]6248// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.rint.f64(double [[X]])6249// APPROX-NEXT: ret double [[TMP0]]6250//6251// NCRDIV-LABEL: define dso_local noundef double @test_rint(6252// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6253// NCRDIV-NEXT: [[ENTRY:.*:]]6254// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.rint.f64(double [[X]])6255// NCRDIV-NEXT: ret double [[TMP0]]6256//6257// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rint(6258// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6259// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6260// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.rint.f64(double [[X]])6261// AMDGCNSPIRV-NEXT: ret double [[TMP0]]6262//6263extern "C" __device__ double test_rint(double x) {6264 return rint(x);6265}6266 6267// DEFAULT-LABEL: define dso_local noundef float @test_rnormf(6268// DEFAULT-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6269// DEFAULT-NEXT: [[ENTRY:.*]]:6270// DEFAULT-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06271// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL6RNORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6272// DEFAULT: [[WHILE_BODY_I]]:6273// DEFAULT-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6274// DEFAULT-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6275// DEFAULT-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6276// DEFAULT-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16277// DEFAULT-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA16]]6278// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]6279// DEFAULT-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]6280// DEFAULT-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 46281// DEFAULT-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06282// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL6RNORMFIPKF_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP22:![0-9]+]]6283// DEFAULT: [[_ZL6RNORMFIPKF_EXIT]]:6284// DEFAULT-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6285// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rsqrt_f32(float noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6286// DEFAULT-NEXT: ret float [[CALL_I]]6287//6288// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rnormf(6289// FINITEONLY-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6290// FINITEONLY-NEXT: [[ENTRY:.*]]:6291// FINITEONLY-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06292// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL6RNORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6293// FINITEONLY: [[WHILE_BODY_I]]:6294// FINITEONLY-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6295// FINITEONLY-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6296// FINITEONLY-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6297// FINITEONLY-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16298// FINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA16]]6299// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract float [[TMP0]], [[TMP0]]6300// FINITEONLY-NEXT: [[ADD_I]] = fadd nnan ninf contract float [[__R_0_I4]], [[MUL_I]]6301// FINITEONLY-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 46302// FINITEONLY-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06303// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL6RNORMFIPKF_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP22:![0-9]+]]6304// FINITEONLY: [[_ZL6RNORMFIPKF_EXIT]]:6305// FINITEONLY-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6306// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_rsqrt_f32(float noundef nofpclass(nan inf) [[__R_0_I_LCSSA]]) #[[ATTR13]]6307// FINITEONLY-NEXT: ret float [[CALL_I]]6308//6309// APPROX-LABEL: define dso_local noundef float @test_rnormf(6310// APPROX-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6311// APPROX-NEXT: [[ENTRY:.*]]:6312// APPROX-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06313// APPROX-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL6RNORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6314// APPROX: [[WHILE_BODY_I]]:6315// APPROX-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6316// APPROX-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6317// APPROX-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6318// APPROX-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16319// APPROX-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA16]]6320// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]6321// APPROX-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]6322// APPROX-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 46323// APPROX-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06324// APPROX-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL6RNORMFIPKF_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP22:![0-9]+]]6325// APPROX: [[_ZL6RNORMFIPKF_EXIT]]:6326// APPROX-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6327// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rsqrt_f32(float noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6328// APPROX-NEXT: ret float [[CALL_I]]6329//6330// NCRDIV-LABEL: define dso_local noundef float @test_rnormf(6331// NCRDIV-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6332// NCRDIV-NEXT: [[ENTRY:.*]]:6333// NCRDIV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06334// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL6RNORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6335// NCRDIV: [[WHILE_BODY_I]]:6336// NCRDIV-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6337// NCRDIV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6338// NCRDIV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6339// NCRDIV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16340// NCRDIV-NEXT: [[TMP0:%.*]] = load float, ptr [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA17]]6341// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]6342// NCRDIV-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]6343// NCRDIV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 46344// NCRDIV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06345// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL6RNORMFIPKF_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP23:![0-9]+]]6346// NCRDIV: [[_ZL6RNORMFIPKF_EXIT]]:6347// NCRDIV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6348// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rsqrt_f32(float noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6349// NCRDIV-NEXT: ret float [[CALL_I]]6350//6351// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rnormf(6352// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], ptr addrspace(4) noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {6353// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:6354// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06355// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL6RNORMFIPKF_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6356// AMDGCNSPIRV: [[WHILE_BODY_I]]:6357// AMDGCNSPIRV-NEXT: [[__R_0_I4:%.*]] = phi float [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6358// AMDGCNSPIRV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6359// AMDGCNSPIRV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6360// AMDGCNSPIRV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16361// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(4) [[__A_ADDR_0_I3]], align 4, !tbaa [[FLOAT_TBAA17]]6362// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP0]]6363// AMDGCNSPIRV-NEXT: [[ADD_I]] = fadd contract float [[__R_0_I4]], [[MUL_I]]6364// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__A_ADDR_0_I3]], i64 46365// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06366// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL6RNORMFIPKF_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP23:![0-9]+]]6367// AMDGCNSPIRV: [[_ZL6RNORMFIPKF_EXIT]]:6368// AMDGCNSPIRV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi float [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6369// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_rsqrt_f32(float noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6370// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]6371//6372extern "C" __device__ float test_rnormf(int x, const float* y) {6373 return rnormf(x, y);6374}6375 6376// DEFAULT-LABEL: define dso_local noundef double @test_rnorm(6377// DEFAULT-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6378// DEFAULT-NEXT: [[ENTRY:.*]]:6379// DEFAULT-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06380// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5RNORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6381// DEFAULT: [[WHILE_BODY_I]]:6382// DEFAULT-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6383// DEFAULT-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6384// DEFAULT-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6385// DEFAULT-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16386// DEFAULT-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA18]]6387// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]6388// DEFAULT-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]6389// DEFAULT-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 86390// DEFAULT-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06391// DEFAULT-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5RNORMIPKD_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP23:![0-9]+]]6392// DEFAULT: [[_ZL5RNORMIPKD_EXIT]]:6393// DEFAULT-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6394// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rsqrt_f64(double noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6395// DEFAULT-NEXT: ret double [[CALL_I]]6396//6397// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rnorm(6398// FINITEONLY-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6399// FINITEONLY-NEXT: [[ENTRY:.*]]:6400// FINITEONLY-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06401// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5RNORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6402// FINITEONLY: [[WHILE_BODY_I]]:6403// FINITEONLY-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6404// FINITEONLY-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6405// FINITEONLY-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6406// FINITEONLY-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16407// FINITEONLY-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA18]]6408// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract double [[TMP0]], [[TMP0]]6409// FINITEONLY-NEXT: [[ADD_I]] = fadd nnan ninf contract double [[__R_0_I4]], [[MUL_I]]6410// FINITEONLY-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 86411// FINITEONLY-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06412// FINITEONLY-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5RNORMIPKD_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP23:![0-9]+]]6413// FINITEONLY: [[_ZL5RNORMIPKD_EXIT]]:6414// FINITEONLY-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6415// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_rsqrt_f64(double noundef nofpclass(nan inf) [[__R_0_I_LCSSA]]) #[[ATTR13]]6416// FINITEONLY-NEXT: ret double [[CALL_I]]6417//6418// APPROX-LABEL: define dso_local noundef double @test_rnorm(6419// APPROX-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6420// APPROX-NEXT: [[ENTRY:.*]]:6421// APPROX-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06422// APPROX-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5RNORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6423// APPROX: [[WHILE_BODY_I]]:6424// APPROX-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6425// APPROX-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6426// APPROX-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6427// APPROX-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16428// APPROX-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA18]]6429// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]6430// APPROX-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]6431// APPROX-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 86432// APPROX-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06433// APPROX-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5RNORMIPKD_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP23:![0-9]+]]6434// APPROX: [[_ZL5RNORMIPKD_EXIT]]:6435// APPROX-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6436// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rsqrt_f64(double noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6437// APPROX-NEXT: ret double [[CALL_I]]6438//6439// NCRDIV-LABEL: define dso_local noundef double @test_rnorm(6440// NCRDIV-SAME: i32 noundef [[X:%.*]], ptr noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {6441// NCRDIV-NEXT: [[ENTRY:.*]]:6442// NCRDIV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06443// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5RNORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6444// NCRDIV: [[WHILE_BODY_I]]:6445// NCRDIV-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6446// NCRDIV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6447// NCRDIV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6448// NCRDIV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16449// NCRDIV-NEXT: [[TMP0:%.*]] = load double, ptr [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA19]]6450// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]6451// NCRDIV-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]6452// NCRDIV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr [[__A_ADDR_0_I3]], i64 86453// NCRDIV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06454// NCRDIV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5RNORMIPKD_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP24:![0-9]+]]6455// NCRDIV: [[_ZL5RNORMIPKD_EXIT]]:6456// NCRDIV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6457// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rsqrt_f64(double noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6458// NCRDIV-NEXT: ret double [[CALL_I]]6459//6460// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rnorm(6461// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], ptr addrspace(4) noundef readonly captures(none) [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {6462// AMDGCNSPIRV-NEXT: [[ENTRY:.*]]:6463// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I1:%.*]] = icmp eq i32 [[X]], 06464// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I1]], label %[[_ZL5RNORMIPKD_EXIT:.*]], label %[[WHILE_BODY_I:.*]]6465// AMDGCNSPIRV: [[WHILE_BODY_I]]:6466// AMDGCNSPIRV-NEXT: [[__R_0_I4:%.*]] = phi double [ [[ADD_I:%.*]], %[[WHILE_BODY_I]] ], [ 0.000000e+00, %[[ENTRY]] ]6467// AMDGCNSPIRV-NEXT: [[__A_ADDR_0_I3:%.*]] = phi ptr addrspace(4) [ [[INCDEC_PTR_I:%.*]], %[[WHILE_BODY_I]] ], [ [[Y]], %[[ENTRY]] ]6468// AMDGCNSPIRV-NEXT: [[__DIM_ADDR_0_I2:%.*]] = phi i32 [ [[DEC_I:%.*]], %[[WHILE_BODY_I]] ], [ [[X]], %[[ENTRY]] ]6469// AMDGCNSPIRV-NEXT: [[DEC_I]] = add nsw i32 [[__DIM_ADDR_0_I2]], -16470// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(4) [[__A_ADDR_0_I3]], align 8, !tbaa [[DOUBLE_TBAA19]]6471// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract double [[TMP0]], [[TMP0]]6472// AMDGCNSPIRV-NEXT: [[ADD_I]] = fadd contract double [[__R_0_I4]], [[MUL_I]]6473// AMDGCNSPIRV-NEXT: [[INCDEC_PTR_I]] = getelementptr inbounds nuw i8, ptr addrspace(4) [[__A_ADDR_0_I3]], i64 86474// AMDGCNSPIRV-NEXT: [[TOBOOL_NOT_I:%.*]] = icmp eq i32 [[DEC_I]], 06475// AMDGCNSPIRV-NEXT: br i1 [[TOBOOL_NOT_I]], label %[[_ZL5RNORMIPKD_EXIT]], label %[[WHILE_BODY_I]], !llvm.loop [[LOOP24:![0-9]+]]6476// AMDGCNSPIRV: [[_ZL5RNORMIPKD_EXIT]]:6477// AMDGCNSPIRV-NEXT: [[__R_0_I_LCSSA:%.*]] = phi double [ 0.000000e+00, %[[ENTRY]] ], [ [[ADD_I]], %[[WHILE_BODY_I]] ]6478// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_rsqrt_f64(double noundef [[__R_0_I_LCSSA]]) #[[ATTR13]]6479// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6480//6481extern "C" __device__ double test_rnorm(int x, const double* y) {6482 return rnorm(x, y);6483}6484 6485// DEFAULT-LABEL: define dso_local noundef float @test_rnorm3df(6486// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6487// DEFAULT-NEXT: [[ENTRY:.*:]]6488// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rlen3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]6489// DEFAULT-NEXT: ret float [[CALL_I]]6490//6491// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rnorm3df(6492// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], float noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6493// FINITEONLY-NEXT: [[ENTRY:.*:]]6494// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_rlen3_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]], float noundef nofpclass(nan inf) [[Z]]) #[[ATTR12]]6495// FINITEONLY-NEXT: ret float [[CALL_I]]6496//6497// APPROX-LABEL: define dso_local noundef float @test_rnorm3df(6498// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6499// APPROX-NEXT: [[ENTRY:.*:]]6500// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rlen3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]6501// APPROX-NEXT: ret float [[CALL_I]]6502//6503// NCRDIV-LABEL: define dso_local noundef float @test_rnorm3df(6504// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6505// NCRDIV-NEXT: [[ENTRY:.*:]]6506// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rlen3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]6507// NCRDIV-NEXT: ret float [[CALL_I]]6508//6509// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rnorm3df(6510// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6511// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6512// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_rlen3_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]]) #[[ATTR12]]6513// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]6514//6515extern "C" __device__ float test_rnorm3df(float x, float y, float z) {6516 return rnorm3df(x, y, z);6517}6518 6519// DEFAULT-LABEL: define dso_local noundef double @test_rnorm3d(6520// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6521// DEFAULT-NEXT: [[ENTRY:.*:]]6522// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rlen3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]6523// DEFAULT-NEXT: ret double [[CALL_I]]6524//6525// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rnorm3d(6526// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6527// FINITEONLY-NEXT: [[ENTRY:.*:]]6528// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_rlen3_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]], double noundef nofpclass(nan inf) [[Z]]) #[[ATTR12]]6529// FINITEONLY-NEXT: ret double [[CALL_I]]6530//6531// APPROX-LABEL: define dso_local noundef double @test_rnorm3d(6532// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6533// APPROX-NEXT: [[ENTRY:.*:]]6534// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rlen3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]6535// APPROX-NEXT: ret double [[CALL_I]]6536//6537// NCRDIV-LABEL: define dso_local noundef double @test_rnorm3d(6538// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR4]] {6539// NCRDIV-NEXT: [[ENTRY:.*:]]6540// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rlen3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]6541// NCRDIV-NEXT: ret double [[CALL_I]]6542//6543// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rnorm3d(6544// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6545// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6546// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_rlen3_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]]) #[[ATTR12]]6547// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6548//6549extern "C" __device__ double test_rnorm3d(double x, double y, double z) {6550 return rnorm3d(x, y, z);6551}6552 6553// DEFAULT-LABEL: define dso_local noundef float @test_rnorm4df(6554// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6555// DEFAULT-NEXT: [[ENTRY:.*:]]6556// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rlen4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]6557// DEFAULT-NEXT: ret float [[CALL_I]]6558//6559// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rnorm4df(6560// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], float noundef nofpclass(nan inf) [[Z:%.*]], float noundef nofpclass(nan inf) [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6561// FINITEONLY-NEXT: [[ENTRY:.*:]]6562// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_rlen4_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]], float noundef nofpclass(nan inf) [[Z]], float noundef nofpclass(nan inf) [[W]]) #[[ATTR12]]6563// FINITEONLY-NEXT: ret float [[CALL_I]]6564//6565// APPROX-LABEL: define dso_local noundef float @test_rnorm4df(6566// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6567// APPROX-NEXT: [[ENTRY:.*:]]6568// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rlen4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]6569// APPROX-NEXT: ret float [[CALL_I]]6570//6571// NCRDIV-LABEL: define dso_local noundef float @test_rnorm4df(6572// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6573// NCRDIV-NEXT: [[ENTRY:.*:]]6574// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rlen4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]6575// NCRDIV-NEXT: ret float [[CALL_I]]6576//6577// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rnorm4df(6578// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]], float noundef [[W:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6579// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6580// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_rlen4_f32(float noundef [[X]], float noundef [[Y]], float noundef [[Z]], float noundef [[W]]) #[[ATTR12]]6581// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]6582//6583extern "C" __device__ float test_rnorm4df(float x, float y, float z, float w) {6584 return rnorm4df(x, y, z, w);6585}6586 6587// DEFAULT-LABEL: define dso_local noundef double @test_rnorm4d(6588// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6589// DEFAULT-NEXT: [[ENTRY:.*:]]6590// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rlen4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]6591// DEFAULT-NEXT: ret double [[CALL_I]]6592//6593// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rnorm4d(6594// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]], double noundef nofpclass(nan inf) [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6595// FINITEONLY-NEXT: [[ENTRY:.*:]]6596// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_rlen4_f64(double noundef nofpclass(nan inf) [[X]], double noundef nofpclass(nan inf) [[Y]], double noundef nofpclass(nan inf) [[Z]], double noundef nofpclass(nan inf) [[W]]) #[[ATTR12]]6597// FINITEONLY-NEXT: ret double [[CALL_I]]6598//6599// APPROX-LABEL: define dso_local noundef double @test_rnorm4d(6600// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6601// APPROX-NEXT: [[ENTRY:.*:]]6602// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rlen4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]6603// APPROX-NEXT: ret double [[CALL_I]]6604//6605// NCRDIV-LABEL: define dso_local noundef double @test_rnorm4d(6606// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr #[[ATTR4]] {6607// NCRDIV-NEXT: [[ENTRY:.*:]]6608// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rlen4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]6609// NCRDIV-NEXT: ret double [[CALL_I]]6610//6611// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rnorm4d(6612// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]], double noundef [[W:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {6613// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6614// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_rlen4_f64(double noundef [[X]], double noundef [[Y]], double noundef [[Z]], double noundef [[W]]) #[[ATTR12]]6615// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6616//6617extern "C" __device__ double test_rnorm4d(double x, double y, double z, double w) {6618 return rnorm4d(x, y, z, w);6619}6620 6621// DEFAULT-LABEL: define dso_local noundef float @test_roundf(6622// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6623// DEFAULT-NEXT: [[ENTRY:.*:]]6624// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.round.f32(float [[X]])6625// DEFAULT-NEXT: ret float [[TMP0]]6626//6627// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_roundf(6628// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6629// FINITEONLY-NEXT: [[ENTRY:.*:]]6630// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.round.f32(float nofpclass(nan inf) [[X]])6631// FINITEONLY-NEXT: ret float [[TMP0]]6632//6633// APPROX-LABEL: define dso_local noundef float @test_roundf(6634// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6635// APPROX-NEXT: [[ENTRY:.*:]]6636// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.round.f32(float [[X]])6637// APPROX-NEXT: ret float [[TMP0]]6638//6639// NCRDIV-LABEL: define dso_local noundef float @test_roundf(6640// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6641// NCRDIV-NEXT: [[ENTRY:.*:]]6642// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.round.f32(float [[X]])6643// NCRDIV-NEXT: ret float [[TMP0]]6644//6645// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_roundf(6646// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6647// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6648// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.round.f32(float [[X]])6649// AMDGCNSPIRV-NEXT: ret float [[TMP0]]6650//6651extern "C" __device__ float test_roundf(float x) {6652 return roundf(x);6653}6654 6655// DEFAULT-LABEL: define dso_local noundef double @test_round(6656// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6657// DEFAULT-NEXT: [[ENTRY:.*:]]6658// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.round.f64(double [[X]])6659// DEFAULT-NEXT: ret double [[TMP0]]6660//6661// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_round(6662// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6663// FINITEONLY-NEXT: [[ENTRY:.*:]]6664// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.round.f64(double nofpclass(nan inf) [[X]])6665// FINITEONLY-NEXT: ret double [[TMP0]]6666//6667// APPROX-LABEL: define dso_local noundef double @test_round(6668// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6669// APPROX-NEXT: [[ENTRY:.*:]]6670// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.round.f64(double [[X]])6671// APPROX-NEXT: ret double [[TMP0]]6672//6673// NCRDIV-LABEL: define dso_local noundef double @test_round(6674// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6675// NCRDIV-NEXT: [[ENTRY:.*:]]6676// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.round.f64(double [[X]])6677// NCRDIV-NEXT: ret double [[TMP0]]6678//6679// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_round(6680// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6681// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6682// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.round.f64(double [[X]])6683// AMDGCNSPIRV-NEXT: ret double [[TMP0]]6684//6685extern "C" __device__ double test_round(double x) {6686 return round(x);6687}6688 6689// DEFAULT-LABEL: define dso_local noundef float @test_rsqrtf(6690// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6691// DEFAULT-NEXT: [[ENTRY:.*:]]6692// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rsqrt_f32(float noundef [[X]]) #[[ATTR13]]6693// DEFAULT-NEXT: ret float [[CALL_I]]6694//6695// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_rsqrtf(6696// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6697// FINITEONLY-NEXT: [[ENTRY:.*:]]6698// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_rsqrt_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]6699// FINITEONLY-NEXT: ret float [[CALL_I]]6700//6701// APPROX-LABEL: define dso_local noundef float @test_rsqrtf(6702// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6703// APPROX-NEXT: [[ENTRY:.*:]]6704// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rsqrt_f32(float noundef [[X]]) #[[ATTR13]]6705// APPROX-NEXT: ret float [[CALL_I]]6706//6707// NCRDIV-LABEL: define dso_local noundef float @test_rsqrtf(6708// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6709// NCRDIV-NEXT: [[ENTRY:.*:]]6710// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_rsqrt_f32(float noundef [[X]]) #[[ATTR13]]6711// NCRDIV-NEXT: ret float [[CALL_I]]6712//6713// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_rsqrtf(6714// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {6715// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6716// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_rsqrt_f32(float noundef [[X]]) #[[ATTR13]]6717// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]6718//6719extern "C" __device__ float test_rsqrtf(float x) {6720 return rsqrtf(x);6721}6722 6723// DEFAULT-LABEL: define dso_local noundef double @test_rsqrt(6724// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6725// DEFAULT-NEXT: [[ENTRY:.*:]]6726// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rsqrt_f64(double noundef [[X]]) #[[ATTR13]]6727// DEFAULT-NEXT: ret double [[CALL_I]]6728//6729// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_rsqrt(6730// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6731// FINITEONLY-NEXT: [[ENTRY:.*:]]6732// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_rsqrt_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]6733// FINITEONLY-NEXT: ret double [[CALL_I]]6734//6735// APPROX-LABEL: define dso_local noundef double @test_rsqrt(6736// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6737// APPROX-NEXT: [[ENTRY:.*:]]6738// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rsqrt_f64(double noundef [[X]]) #[[ATTR13]]6739// APPROX-NEXT: ret double [[CALL_I]]6740//6741// NCRDIV-LABEL: define dso_local noundef double @test_rsqrt(6742// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {6743// NCRDIV-NEXT: [[ENTRY:.*:]]6744// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_rsqrt_f64(double noundef [[X]]) #[[ATTR13]]6745// NCRDIV-NEXT: ret double [[CALL_I]]6746//6747// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_rsqrt(6748// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {6749// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6750// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_rsqrt_f64(double noundef [[X]]) #[[ATTR13]]6751// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]6752//6753extern "C" __device__ double test_rsqrt(double x) {6754 return rsqrt(x);6755}6756 6757// DEFAULT-LABEL: define dso_local noundef float @test_scalblnf(6758// DEFAULT-SAME: float noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6759// DEFAULT-NEXT: [[ENTRY:.*:]]6760// DEFAULT-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6761// DEFAULT-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326762// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[CONV_I]])6763// DEFAULT-NEXT: ret float [[TMP0]]6764//6765// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_scalblnf(6766// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6767// FINITEONLY-NEXT: [[ENTRY:.*:]]6768// FINITEONLY-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6769// FINITEONLY-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326770// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.ldexp.f32.i32(float nofpclass(nan inf) [[X]], i32 [[CONV_I]])6771// FINITEONLY-NEXT: ret float [[TMP0]]6772//6773// APPROX-LABEL: define dso_local noundef float @test_scalblnf(6774// APPROX-SAME: float noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6775// APPROX-NEXT: [[ENTRY:.*:]]6776// APPROX-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6777// APPROX-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326778// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[CONV_I]])6779// APPROX-NEXT: ret float [[TMP0]]6780//6781// NCRDIV-LABEL: define dso_local noundef float @test_scalblnf(6782// NCRDIV-SAME: float noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6783// NCRDIV-NEXT: [[ENTRY:.*:]]6784// NCRDIV-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6785// NCRDIV-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326786// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[CONV_I]])6787// NCRDIV-NEXT: ret float [[TMP0]]6788//6789// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_scalblnf(6790// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6791// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6792// AMDGCNSPIRV-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call addrspace(4) i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6793// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326794// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.ldexp.f32.i32(float [[X]], i32 [[CONV_I]])6795// AMDGCNSPIRV-NEXT: ret float [[TMP0]]6796//6797extern "C" __device__ float test_scalblnf(float x, long int y) {6798 return scalblnf(x, y);6799}6800 6801// DEFAULT-LABEL: define dso_local noundef double @test_scalbln(6802// DEFAULT-SAME: double noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6803// DEFAULT-NEXT: [[ENTRY:.*:]]6804// DEFAULT-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6805// DEFAULT-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326806// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[CONV_I]])6807// DEFAULT-NEXT: ret double [[TMP0]]6808//6809// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_scalbln(6810// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6811// FINITEONLY-NEXT: [[ENTRY:.*:]]6812// FINITEONLY-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6813// FINITEONLY-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326814// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.ldexp.f64.i32(double nofpclass(nan inf) [[X]], i32 [[CONV_I]])6815// FINITEONLY-NEXT: ret double [[TMP0]]6816//6817// APPROX-LABEL: define dso_local noundef double @test_scalbln(6818// APPROX-SAME: double noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6819// APPROX-NEXT: [[ENTRY:.*:]]6820// APPROX-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6821// APPROX-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326822// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[CONV_I]])6823// APPROX-NEXT: ret double [[TMP0]]6824//6825// NCRDIV-LABEL: define dso_local noundef double @test_scalbln(6826// NCRDIV-SAME: double noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6827// NCRDIV-NEXT: [[ENTRY:.*:]]6828// NCRDIV-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6829// NCRDIV-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326830// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[CONV_I]])6831// NCRDIV-NEXT: ret double [[TMP0]]6832//6833// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_scalbln(6834// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], i64 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6835// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6836// AMDGCNSPIRV-NEXT: [[SPEC_STORE_SELECT_I:%.*]] = tail call addrspace(4) i64 @llvm.smax.i64(i64 [[Y]], i64 -2147483648)6837// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = trunc i64 [[SPEC_STORE_SELECT_I]] to i326838// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.ldexp.f64.i32(double [[X]], i32 [[CONV_I]])6839// AMDGCNSPIRV-NEXT: ret double [[TMP0]]6840//6841extern "C" __device__ double test_scalbln(double x, long int y) {6842 return scalbln(x, y);6843}6844 6845// DEFAULT-LABEL: define dso_local noundef float @test_scalbnf(6846// DEFAULT-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6847// DEFAULT-NEXT: [[ENTRY:.*:]]6848// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])6849// DEFAULT-NEXT: ret float [[TMP0]]6850//6851// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_scalbnf(6852// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6853// FINITEONLY-NEXT: [[ENTRY:.*:]]6854// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.ldexp.f32.i32(float nofpclass(nan inf) [[X]], i32 [[Y]])6855// FINITEONLY-NEXT: ret float [[TMP0]]6856//6857// APPROX-LABEL: define dso_local noundef float @test_scalbnf(6858// APPROX-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6859// APPROX-NEXT: [[ENTRY:.*:]]6860// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])6861// APPROX-NEXT: ret float [[TMP0]]6862//6863// NCRDIV-LABEL: define dso_local noundef float @test_scalbnf(6864// NCRDIV-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6865// NCRDIV-NEXT: [[ENTRY:.*:]]6866// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])6867// NCRDIV-NEXT: ret float [[TMP0]]6868//6869// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_scalbnf(6870// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6871// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6872// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.ldexp.f32.i32(float [[X]], i32 [[Y]])6873// AMDGCNSPIRV-NEXT: ret float [[TMP0]]6874//6875extern "C" __device__ float test_scalbnf(float x, int y) {6876 return scalbnf(x, y);6877}6878 6879// DEFAULT-LABEL: define dso_local noundef double @test_scalbn(6880// DEFAULT-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6881// DEFAULT-NEXT: [[ENTRY:.*:]]6882// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])6883// DEFAULT-NEXT: ret double [[TMP0]]6884//6885// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_scalbn(6886// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6887// FINITEONLY-NEXT: [[ENTRY:.*:]]6888// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.ldexp.f64.i32(double nofpclass(nan inf) [[X]], i32 [[Y]])6889// FINITEONLY-NEXT: ret double [[TMP0]]6890//6891// APPROX-LABEL: define dso_local noundef double @test_scalbn(6892// APPROX-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6893// APPROX-NEXT: [[ENTRY:.*:]]6894// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])6895// APPROX-NEXT: ret double [[TMP0]]6896//6897// NCRDIV-LABEL: define dso_local noundef double @test_scalbn(6898// NCRDIV-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {6899// NCRDIV-NEXT: [[ENTRY:.*:]]6900// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])6901// NCRDIV-NEXT: ret double [[TMP0]]6902//6903// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_scalbn(6904// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6905// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6906// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.ldexp.f64.i32(double [[X]], i32 [[Y]])6907// AMDGCNSPIRV-NEXT: ret double [[TMP0]]6908//6909extern "C" __device__ double test_scalbn(double x, int y) {6910 return scalbn(x, y);6911}6912 6913// DEFAULT-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___signbitf(6914// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6915// DEFAULT-NEXT: [[ENTRY:.*:]]6916// DEFAULT-NEXT: [[TMP0:%.*]] = bitcast float [[X]] to i326917// DEFAULT-NEXT: [[DOTLOBIT:%.*]] = lshr i32 [[TMP0]], 316918// DEFAULT-NEXT: ret i32 [[DOTLOBIT]]6919//6920// FINITEONLY-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___signbitf(6921// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6922// FINITEONLY-NEXT: [[ENTRY:.*:]]6923// FINITEONLY-NEXT: [[TMP0:%.*]] = bitcast float [[X]] to i326924// FINITEONLY-NEXT: [[DOTLOBIT:%.*]] = lshr i32 [[TMP0]], 316925// FINITEONLY-NEXT: ret i32 [[DOTLOBIT]]6926//6927// APPROX-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___signbitf(6928// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6929// APPROX-NEXT: [[ENTRY:.*:]]6930// APPROX-NEXT: [[TMP0:%.*]] = bitcast float [[X]] to i326931// APPROX-NEXT: [[DOTLOBIT:%.*]] = lshr i32 [[TMP0]], 316932// APPROX-NEXT: ret i32 [[DOTLOBIT]]6933//6934// NCRDIV-LABEL: define dso_local noundef range(i32 0, 2) i32 @test___signbitf(6935// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6936// NCRDIV-NEXT: [[ENTRY:.*:]]6937// NCRDIV-NEXT: [[TMP0:%.*]] = bitcast float [[X]] to i326938// NCRDIV-NEXT: [[DOTLOBIT:%.*]] = lshr i32 [[TMP0]], 316939// NCRDIV-NEXT: ret i32 [[DOTLOBIT]]6940//6941// AMDGCNSPIRV-LABEL: define spir_func noundef range(i32 0, 2) i32 @test___signbitf(6942// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6943// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6944// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = bitcast float [[X]] to i326945// AMDGCNSPIRV-NEXT: [[DOTLOBIT:%.*]] = lshr i32 [[TMP0]], 316946// AMDGCNSPIRV-NEXT: ret i32 [[DOTLOBIT]]6947//6948extern "C" __device__ BOOL_TYPE test___signbitf(float x) {6949 return __signbitf(x);6950}6951 6952// DEFAULT-LABEL: define dso_local range(i32 0, 2) i32 @test___signbit(6953// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6954// DEFAULT-NEXT: [[ENTRY:.*:]]6955// DEFAULT-NEXT: [[TMP0:%.*]] = bitcast double [[X]] to i646956// DEFAULT-NEXT: [[DOTLOBIT:%.*]] = lshr i64 [[TMP0]], 636957// DEFAULT-NEXT: [[CONV:%.*]] = trunc nuw nsw i64 [[DOTLOBIT]] to i326958// DEFAULT-NEXT: ret i32 [[CONV]]6959//6960// FINITEONLY-LABEL: define dso_local range(i32 0, 2) i32 @test___signbit(6961// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6962// FINITEONLY-NEXT: [[ENTRY:.*:]]6963// FINITEONLY-NEXT: [[TMP0:%.*]] = bitcast double [[X]] to i646964// FINITEONLY-NEXT: [[DOTLOBIT:%.*]] = lshr i64 [[TMP0]], 636965// FINITEONLY-NEXT: [[CONV:%.*]] = trunc nuw nsw i64 [[DOTLOBIT]] to i326966// FINITEONLY-NEXT: ret i32 [[CONV]]6967//6968// APPROX-LABEL: define dso_local range(i32 0, 2) i32 @test___signbit(6969// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6970// APPROX-NEXT: [[ENTRY:.*:]]6971// APPROX-NEXT: [[TMP0:%.*]] = bitcast double [[X]] to i646972// APPROX-NEXT: [[DOTLOBIT:%.*]] = lshr i64 [[TMP0]], 636973// APPROX-NEXT: [[CONV:%.*]] = trunc nuw nsw i64 [[DOTLOBIT]] to i326974// APPROX-NEXT: ret i32 [[CONV]]6975//6976// NCRDIV-LABEL: define dso_local range(i32 0, 2) i32 @test___signbit(6977// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {6978// NCRDIV-NEXT: [[ENTRY:.*:]]6979// NCRDIV-NEXT: [[TMP0:%.*]] = bitcast double [[X]] to i646980// NCRDIV-NEXT: [[DOTLOBIT:%.*]] = lshr i64 [[TMP0]], 636981// NCRDIV-NEXT: [[CONV:%.*]] = trunc nuw nsw i64 [[DOTLOBIT]] to i326982// NCRDIV-NEXT: ret i32 [[CONV]]6983//6984// AMDGCNSPIRV-LABEL: define spir_func range(i32 0, 2) i32 @test___signbit(6985// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {6986// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]6987// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = bitcast double [[X]] to i646988// AMDGCNSPIRV-NEXT: [[DOTLOBIT:%.*]] = lshr i64 [[TMP0]], 636989// AMDGCNSPIRV-NEXT: [[CONV:%.*]] = trunc nuw nsw i64 [[DOTLOBIT]] to i326990// AMDGCNSPIRV-NEXT: ret i32 [[CONV]]6991//6992extern "C" __device__ BOOL_TYPE test___signbit(double x) {6993 return __signbit(x);6994}6995 6996// DEFAULT-LABEL: define dso_local void @test_sincosf(6997// DEFAULT-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {6998// DEFAULT-NEXT: [[ENTRY:.*:]]6999// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7000// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7001// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract float @__ocml_sincos_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7002// DEFAULT-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]7003// DEFAULT-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16]]7004// DEFAULT-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]7005// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7006// DEFAULT-NEXT: ret void7007//7008// FINITEONLY-LABEL: define dso_local void @test_sincosf(7009// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7010// FINITEONLY-NEXT: [[ENTRY:.*:]]7011// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7012// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7013// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract nofpclass(nan inf) float @__ocml_sincos_f32(float noundef nofpclass(nan inf) [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7014// FINITEONLY-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]7015// FINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16]]7016// FINITEONLY-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]7017// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7018// FINITEONLY-NEXT: ret void7019//7020// APPROX-LABEL: define dso_local void @test_sincosf(7021// APPROX-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7022// APPROX-NEXT: [[ENTRY:.*:]]7023// APPROX-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7024// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7025// APPROX-NEXT: [[CALL_I:%.*]] = call contract float @__ocml_sincos_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7026// APPROX-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]7027// APPROX-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16]]7028// APPROX-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]7029// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7030// APPROX-NEXT: ret void7031//7032// NCRDIV-LABEL: define dso_local void @test_sincosf(7033// NCRDIV-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7034// NCRDIV-NEXT: [[ENTRY:.*:]]7035// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7036// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7037// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract float @__ocml_sincos_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7038// NCRDIV-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]7039// NCRDIV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA17]]7040// NCRDIV-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA17]]7041// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7042// NCRDIV-NEXT: ret void7043//7044// AMDGCNSPIRV-LABEL: define spir_func void @test_sincosf(7045// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7046// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7047// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca float, align 47048// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)7049// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7050// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func addrspace(4) float @__ocml_sincos_f32(float noundef [[X]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]7051// AMDGCNSPIRV-NEXT: store float [[CALL_I]], ptr addrspace(4) [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]7052// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(4) [[__TMP_ASCAST_I]], align 4, !tbaa [[FLOAT_TBAA17]]7053// AMDGCNSPIRV-NEXT: store float [[TMP0]], ptr addrspace(4) [[Z]], align 4, !tbaa [[FLOAT_TBAA17]]7054// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7055// AMDGCNSPIRV-NEXT: ret void7056//7057extern "C" __device__ void test_sincosf(float x, float *y, float *z) {7058 sincosf(x, y, z);7059}7060 7061// DEFAULT-LABEL: define dso_local void @test_sincos(7062// DEFAULT-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7063// DEFAULT-NEXT: [[ENTRY:.*:]]7064// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7065// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7066// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract double @__ocml_sincos_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7067// DEFAULT-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]7068// DEFAULT-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18]]7069// DEFAULT-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA18]]7070// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7071// DEFAULT-NEXT: ret void7072//7073// FINITEONLY-LABEL: define dso_local void @test_sincos(7074// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7075// FINITEONLY-NEXT: [[ENTRY:.*:]]7076// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7077// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7078// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract nofpclass(nan inf) double @__ocml_sincos_f64(double noundef nofpclass(nan inf) [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7079// FINITEONLY-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]7080// FINITEONLY-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18]]7081// FINITEONLY-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA18]]7082// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7083// FINITEONLY-NEXT: ret void7084//7085// APPROX-LABEL: define dso_local void @test_sincos(7086// APPROX-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7087// APPROX-NEXT: [[ENTRY:.*:]]7088// APPROX-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7089// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7090// APPROX-NEXT: [[CALL_I:%.*]] = call contract double @__ocml_sincos_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7091// APPROX-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]7092// APPROX-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18]]7093// APPROX-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA18]]7094// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7095// APPROX-NEXT: ret void7096//7097// NCRDIV-LABEL: define dso_local void @test_sincos(7098// NCRDIV-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7099// NCRDIV-NEXT: [[ENTRY:.*:]]7100// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7101// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7102// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract double @__ocml_sincos_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7103// NCRDIV-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA19]]7104// NCRDIV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA19]]7105// NCRDIV-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA19]]7106// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7107// NCRDIV-NEXT: ret void7108//7109// AMDGCNSPIRV-LABEL: define spir_func void @test_sincos(7110// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7111// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7112// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca double, align 87113// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)7114// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7115// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func addrspace(4) double @__ocml_sincos_f64(double noundef [[X]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]7116// AMDGCNSPIRV-NEXT: store double [[CALL_I]], ptr addrspace(4) [[Y]], align 8, !tbaa [[DOUBLE_TBAA19]]7117// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(4) [[__TMP_ASCAST_I]], align 8, !tbaa [[DOUBLE_TBAA19]]7118// AMDGCNSPIRV-NEXT: store double [[TMP0]], ptr addrspace(4) [[Z]], align 8, !tbaa [[DOUBLE_TBAA19]]7119// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7120// AMDGCNSPIRV-NEXT: ret void7121//7122extern "C" __device__ void test_sincos(double x, double *y, double *z) {7123 sincos(x, y, z);7124}7125 7126// DEFAULT-LABEL: define dso_local void @test_sincospif(7127// DEFAULT-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7128// DEFAULT-NEXT: [[ENTRY:.*:]]7129// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7130// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7131// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract float @__ocml_sincospi_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7132// DEFAULT-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]7133// DEFAULT-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16]]7134// DEFAULT-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]7135// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7136// DEFAULT-NEXT: ret void7137//7138// FINITEONLY-LABEL: define dso_local void @test_sincospif(7139// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7140// FINITEONLY-NEXT: [[ENTRY:.*:]]7141// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7142// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7143// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract nofpclass(nan inf) float @__ocml_sincospi_f32(float noundef nofpclass(nan inf) [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7144// FINITEONLY-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]7145// FINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16]]7146// FINITEONLY-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]7147// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7148// FINITEONLY-NEXT: ret void7149//7150// APPROX-LABEL: define dso_local void @test_sincospif(7151// APPROX-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7152// APPROX-NEXT: [[ENTRY:.*:]]7153// APPROX-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7154// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7155// APPROX-NEXT: [[CALL_I:%.*]] = call contract float @__ocml_sincospi_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7156// APPROX-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]7157// APPROX-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA16]]7158// APPROX-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]7159// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7160// APPROX-NEXT: ret void7161//7162// NCRDIV-LABEL: define dso_local void @test_sincospif(7163// NCRDIV-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7164// NCRDIV-NEXT: [[ENTRY:.*:]]7165// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca float, align 4, addrspace(5)7166// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7167// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract float @__ocml_sincospi_f32(float noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7168// NCRDIV-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]7169// NCRDIV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(5) [[__TMP_I]], align 4, !tbaa [[FLOAT_TBAA17]]7170// NCRDIV-NEXT: store float [[TMP0]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA17]]7171// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7172// NCRDIV-NEXT: ret void7173//7174// AMDGCNSPIRV-LABEL: define spir_func void @test_sincospif(7175// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7176// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7177// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca float, align 47178// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)7179// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7180// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func addrspace(4) float @__ocml_sincospi_f32(float noundef [[X]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]7181// AMDGCNSPIRV-NEXT: store float [[CALL_I]], ptr addrspace(4) [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]7182// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(4) [[__TMP_ASCAST_I]], align 4, !tbaa [[FLOAT_TBAA17]]7183// AMDGCNSPIRV-NEXT: store float [[TMP0]], ptr addrspace(4) [[Z]], align 4, !tbaa [[FLOAT_TBAA17]]7184// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7185// AMDGCNSPIRV-NEXT: ret void7186//7187extern "C" __device__ void test_sincospif(float x, float *y, float *z) {7188 sincospif(x, y, z);7189}7190 7191// DEFAULT-LABEL: define dso_local void @test_sincospi(7192// DEFAULT-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7193// DEFAULT-NEXT: [[ENTRY:.*:]]7194// DEFAULT-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7195// DEFAULT-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7196// DEFAULT-NEXT: [[CALL_I:%.*]] = call contract double @__ocml_sincospi_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7197// DEFAULT-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]7198// DEFAULT-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18]]7199// DEFAULT-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA18]]7200// DEFAULT-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7201// DEFAULT-NEXT: ret void7202//7203// FINITEONLY-LABEL: define dso_local void @test_sincospi(7204// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7205// FINITEONLY-NEXT: [[ENTRY:.*:]]7206// FINITEONLY-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7207// FINITEONLY-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7208// FINITEONLY-NEXT: [[CALL_I:%.*]] = call nnan ninf contract nofpclass(nan inf) double @__ocml_sincospi_f64(double noundef nofpclass(nan inf) [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7209// FINITEONLY-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]7210// FINITEONLY-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18]]7211// FINITEONLY-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA18]]7212// FINITEONLY-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7213// FINITEONLY-NEXT: ret void7214//7215// APPROX-LABEL: define dso_local void @test_sincospi(7216// APPROX-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7217// APPROX-NEXT: [[ENTRY:.*:]]7218// APPROX-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7219// APPROX-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7220// APPROX-NEXT: [[CALL_I:%.*]] = call contract double @__ocml_sincospi_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7221// APPROX-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA18]]7222// APPROX-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA18]]7223// APPROX-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA18]]7224// APPROX-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7225// APPROX-NEXT: ret void7226//7227// NCRDIV-LABEL: define dso_local void @test_sincospi(7228// NCRDIV-SAME: double noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {7229// NCRDIV-NEXT: [[ENTRY:.*:]]7230// NCRDIV-NEXT: [[__TMP_I:%.*]] = alloca double, align 8, addrspace(5)7231// NCRDIV-NEXT: call void @llvm.lifetime.start.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7232// NCRDIV-NEXT: [[CALL_I:%.*]] = call contract double @__ocml_sincospi_f64(double noundef [[X]], ptr addrspace(5) noundef [[__TMP_I]]) #[[ATTR14]]7233// NCRDIV-NEXT: store double [[CALL_I]], ptr [[Y]], align 8, !tbaa [[DOUBLE_TBAA19]]7234// NCRDIV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(5) [[__TMP_I]], align 8, !tbaa [[DOUBLE_TBAA19]]7235// NCRDIV-NEXT: store double [[TMP0]], ptr [[Z]], align 8, !tbaa [[DOUBLE_TBAA19]]7236// NCRDIV-NEXT: call void @llvm.lifetime.end.p5(ptr addrspace(5) [[__TMP_I]]) #[[ATTR15]]7237// NCRDIV-NEXT: ret void7238//7239// AMDGCNSPIRV-LABEL: define spir_func void @test_sincospi(7240// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 8)) [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 8)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7241// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7242// AMDGCNSPIRV-NEXT: [[__TMP_I:%.*]] = alloca double, align 87243// AMDGCNSPIRV-NEXT: [[__TMP_ASCAST_I:%.*]] = addrspacecast ptr [[__TMP_I]] to ptr addrspace(4)7244// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.start.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7245// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = call contract spir_func addrspace(4) double @__ocml_sincospi_f64(double noundef [[X]], ptr noundef nonnull [[__TMP_I]]) #[[ATTR14]]7246// AMDGCNSPIRV-NEXT: store double [[CALL_I]], ptr addrspace(4) [[Y]], align 8, !tbaa [[DOUBLE_TBAA19]]7247// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = load double, ptr addrspace(4) [[__TMP_ASCAST_I]], align 8, !tbaa [[DOUBLE_TBAA19]]7248// AMDGCNSPIRV-NEXT: store double [[TMP0]], ptr addrspace(4) [[Z]], align 8, !tbaa [[DOUBLE_TBAA19]]7249// AMDGCNSPIRV-NEXT: call addrspace(4) void @llvm.lifetime.end.p0(ptr nonnull [[__TMP_I]]) #[[ATTR15]]7250// AMDGCNSPIRV-NEXT: ret void7251//7252extern "C" __device__ void test_sincospi(double x, double *y, double *z) {7253 sincospi(x, y, z);7254}7255 7256// DEFAULT-LABEL: define dso_local noundef float @test_sinf(7257// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7258// DEFAULT-NEXT: [[ENTRY:.*:]]7259// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_sin_f32(float noundef [[X]]) #[[ATTR14]]7260// DEFAULT-NEXT: ret float [[CALL_I]]7261//7262// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_sinf(7263// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7264// FINITEONLY-NEXT: [[ENTRY:.*:]]7265// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_sin_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7266// FINITEONLY-NEXT: ret float [[CALL_I]]7267//7268// APPROX-LABEL: define dso_local noundef float @test_sinf(7269// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7270// APPROX-NEXT: [[ENTRY:.*:]]7271// APPROX-NEXT: [[CALL_I1:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]7272// APPROX-NEXT: ret float [[CALL_I1]]7273//7274// NCRDIV-LABEL: define dso_local noundef float @test_sinf(7275// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7276// NCRDIV-NEXT: [[ENTRY:.*:]]7277// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_sin_f32(float noundef [[X]]) #[[ATTR14]]7278// NCRDIV-NEXT: ret float [[CALL_I]]7279//7280// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_sinf(7281// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7282// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7283// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_sin_f32(float noundef [[X]]) #[[ATTR14]]7284// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7285//7286extern "C" __device__ float test_sinf(float x) {7287 return sinf(x);7288}7289 7290// DEFAULT-LABEL: define dso_local noundef double @test_sin(7291// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7292// DEFAULT-NEXT: [[ENTRY:.*:]]7293// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_sin_f64(double noundef [[X]]) #[[ATTR14]]7294// DEFAULT-NEXT: ret double [[CALL_I]]7295//7296// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_sin(7297// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7298// FINITEONLY-NEXT: [[ENTRY:.*:]]7299// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_sin_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7300// FINITEONLY-NEXT: ret double [[CALL_I]]7301//7302// APPROX-LABEL: define dso_local noundef double @test_sin(7303// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7304// APPROX-NEXT: [[ENTRY:.*:]]7305// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_sin_f64(double noundef [[X]]) #[[ATTR14]]7306// APPROX-NEXT: ret double [[CALL_I]]7307//7308// NCRDIV-LABEL: define dso_local noundef double @test_sin(7309// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7310// NCRDIV-NEXT: [[ENTRY:.*:]]7311// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_sin_f64(double noundef [[X]]) #[[ATTR14]]7312// NCRDIV-NEXT: ret double [[CALL_I]]7313//7314// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_sin(7315// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7316// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7317// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_sin_f64(double noundef [[X]]) #[[ATTR14]]7318// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7319//7320extern "C" __device__ double test_sin(double x) {7321 return sin(x);7322}7323 7324// DEFAULT-LABEL: define dso_local noundef float @test_sinpif(7325// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7326// DEFAULT-NEXT: [[ENTRY:.*:]]7327// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_sinpi_f32(float noundef [[X]]) #[[ATTR14]]7328// DEFAULT-NEXT: ret float [[CALL_I]]7329//7330// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_sinpif(7331// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7332// FINITEONLY-NEXT: [[ENTRY:.*:]]7333// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_sinpi_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7334// FINITEONLY-NEXT: ret float [[CALL_I]]7335//7336// APPROX-LABEL: define dso_local noundef float @test_sinpif(7337// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7338// APPROX-NEXT: [[ENTRY:.*:]]7339// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_sinpi_f32(float noundef [[X]]) #[[ATTR14]]7340// APPROX-NEXT: ret float [[CALL_I]]7341//7342// NCRDIV-LABEL: define dso_local noundef float @test_sinpif(7343// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7344// NCRDIV-NEXT: [[ENTRY:.*:]]7345// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_sinpi_f32(float noundef [[X]]) #[[ATTR14]]7346// NCRDIV-NEXT: ret float [[CALL_I]]7347//7348// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_sinpif(7349// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7350// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7351// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_sinpi_f32(float noundef [[X]]) #[[ATTR14]]7352// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7353//7354extern "C" __device__ float test_sinpif(float x) {7355 return sinpif(x);7356}7357 7358// DEFAULT-LABEL: define dso_local noundef double @test_sinpi(7359// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7360// DEFAULT-NEXT: [[ENTRY:.*:]]7361// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_sinpi_f64(double noundef [[X]]) #[[ATTR14]]7362// DEFAULT-NEXT: ret double [[CALL_I]]7363//7364// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_sinpi(7365// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7366// FINITEONLY-NEXT: [[ENTRY:.*:]]7367// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_sinpi_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7368// FINITEONLY-NEXT: ret double [[CALL_I]]7369//7370// APPROX-LABEL: define dso_local noundef double @test_sinpi(7371// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7372// APPROX-NEXT: [[ENTRY:.*:]]7373// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_sinpi_f64(double noundef [[X]]) #[[ATTR14]]7374// APPROX-NEXT: ret double [[CALL_I]]7375//7376// NCRDIV-LABEL: define dso_local noundef double @test_sinpi(7377// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7378// NCRDIV-NEXT: [[ENTRY:.*:]]7379// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_sinpi_f64(double noundef [[X]]) #[[ATTR14]]7380// NCRDIV-NEXT: ret double [[CALL_I]]7381//7382// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_sinpi(7383// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7384// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7385// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_sinpi_f64(double noundef [[X]]) #[[ATTR14]]7386// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7387//7388extern "C" __device__ double test_sinpi(double x) {7389 return sinpi(x);7390}7391 7392// DEFAULT-LABEL: define dso_local noundef float @test_sqrtf(7393// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7394// DEFAULT-NEXT: [[ENTRY:.*:]]7395// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.sqrt.f32(float [[X]])7396// DEFAULT-NEXT: ret float [[TMP0]]7397//7398// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_sqrtf(7399// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7400// FINITEONLY-NEXT: [[ENTRY:.*:]]7401// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.sqrt.f32(float nofpclass(nan inf) [[X]])7402// FINITEONLY-NEXT: ret float [[TMP0]]7403//7404// APPROX-LABEL: define dso_local noundef float @test_sqrtf(7405// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7406// APPROX-NEXT: [[ENTRY:.*:]]7407// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.sqrt.f32(float [[X]])7408// APPROX-NEXT: ret float [[TMP0]]7409//7410// NCRDIV-LABEL: define dso_local noundef float @test_sqrtf(7411// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7412// NCRDIV-NEXT: [[ENTRY:.*:]]7413// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.sqrt.f32(float [[X]]), !fpmath [[META25:![0-9]+]]7414// NCRDIV-NEXT: ret float [[TMP0]]7415//7416// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_sqrtf(7417// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {7418// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7419// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.sqrt.f32(float [[X]])7420// AMDGCNSPIRV-NEXT: ret float [[TMP0]]7421//7422extern "C" __device__ float test_sqrtf(float x) {7423 return sqrtf(x);7424}7425 7426// DEFAULT-LABEL: define dso_local noundef double @test_sqrt(7427// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7428// DEFAULT-NEXT: [[ENTRY:.*:]]7429// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.sqrt.f64(double [[X]])7430// DEFAULT-NEXT: ret double [[TMP0]]7431//7432// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_sqrt(7433// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7434// FINITEONLY-NEXT: [[ENTRY:.*:]]7435// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.sqrt.f64(double nofpclass(nan inf) [[X]])7436// FINITEONLY-NEXT: ret double [[TMP0]]7437//7438// APPROX-LABEL: define dso_local noundef double @test_sqrt(7439// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7440// APPROX-NEXT: [[ENTRY:.*:]]7441// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.sqrt.f64(double [[X]])7442// APPROX-NEXT: ret double [[TMP0]]7443//7444// NCRDIV-LABEL: define dso_local noundef double @test_sqrt(7445// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7446// NCRDIV-NEXT: [[ENTRY:.*:]]7447// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.sqrt.f64(double [[X]])7448// NCRDIV-NEXT: ret double [[TMP0]]7449//7450// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_sqrt(7451// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {7452// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7453// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.sqrt.f64(double [[X]])7454// AMDGCNSPIRV-NEXT: ret double [[TMP0]]7455//7456extern "C" __device__ double test_sqrt(double x) {7457 return sqrt(x);7458}7459 7460// DEFAULT-LABEL: define dso_local noundef float @test_tanf(7461// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7462// DEFAULT-NEXT: [[ENTRY:.*:]]7463// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tan_f32(float noundef [[X]]) #[[ATTR14]]7464// DEFAULT-NEXT: ret float [[CALL_I]]7465//7466// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_tanf(7467// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7468// FINITEONLY-NEXT: [[ENTRY:.*:]]7469// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_tan_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7470// FINITEONLY-NEXT: ret float [[CALL_I]]7471//7472// APPROX-LABEL: define dso_local noundef float @test_tanf(7473// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7474// APPROX-NEXT: [[ENTRY:.*:]]7475// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tan_f32(float noundef [[X]]) #[[ATTR14]]7476// APPROX-NEXT: ret float [[CALL_I]]7477//7478// NCRDIV-LABEL: define dso_local noundef float @test_tanf(7479// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7480// NCRDIV-NEXT: [[ENTRY:.*:]]7481// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tan_f32(float noundef [[X]]) #[[ATTR14]]7482// NCRDIV-NEXT: ret float [[CALL_I]]7483//7484// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_tanf(7485// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7486// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7487// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_tan_f32(float noundef [[X]]) #[[ATTR14]]7488// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7489//7490extern "C" __device__ float test_tanf(float x) {7491 return tanf(x);7492}7493 7494// DEFAULT-LABEL: define dso_local noundef double @test_tan(7495// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7496// DEFAULT-NEXT: [[ENTRY:.*:]]7497// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tan_f64(double noundef [[X]]) #[[ATTR14]]7498// DEFAULT-NEXT: ret double [[CALL_I]]7499//7500// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_tan(7501// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7502// FINITEONLY-NEXT: [[ENTRY:.*:]]7503// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_tan_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7504// FINITEONLY-NEXT: ret double [[CALL_I]]7505//7506// APPROX-LABEL: define dso_local noundef double @test_tan(7507// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7508// APPROX-NEXT: [[ENTRY:.*:]]7509// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tan_f64(double noundef [[X]]) #[[ATTR14]]7510// APPROX-NEXT: ret double [[CALL_I]]7511//7512// NCRDIV-LABEL: define dso_local noundef double @test_tan(7513// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7514// NCRDIV-NEXT: [[ENTRY:.*:]]7515// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tan_f64(double noundef [[X]]) #[[ATTR14]]7516// NCRDIV-NEXT: ret double [[CALL_I]]7517//7518// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_tan(7519// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7520// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7521// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_tan_f64(double noundef [[X]]) #[[ATTR14]]7522// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7523//7524extern "C" __device__ double test_tan(double x) {7525 return tan(x);7526}7527 7528// DEFAULT-LABEL: define dso_local noundef float @test_tanhf(7529// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7530// DEFAULT-NEXT: [[ENTRY:.*:]]7531// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tanh_f32(float noundef [[X]]) #[[ATTR13]]7532// DEFAULT-NEXT: ret float [[CALL_I]]7533//7534// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_tanhf(7535// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7536// FINITEONLY-NEXT: [[ENTRY:.*:]]7537// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_tanh_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]7538// FINITEONLY-NEXT: ret float [[CALL_I]]7539//7540// APPROX-LABEL: define dso_local noundef float @test_tanhf(7541// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7542// APPROX-NEXT: [[ENTRY:.*:]]7543// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tanh_f32(float noundef [[X]]) #[[ATTR13]]7544// APPROX-NEXT: ret float [[CALL_I]]7545//7546// NCRDIV-LABEL: define dso_local noundef float @test_tanhf(7547// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7548// NCRDIV-NEXT: [[ENTRY:.*:]]7549// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tanh_f32(float noundef [[X]]) #[[ATTR13]]7550// NCRDIV-NEXT: ret float [[CALL_I]]7551//7552// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_tanhf(7553// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {7554// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7555// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_tanh_f32(float noundef [[X]]) #[[ATTR13]]7556// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7557//7558extern "C" __device__ float test_tanhf(float x) {7559 return tanhf(x);7560}7561 7562// DEFAULT-LABEL: define dso_local noundef double @test_tanh(7563// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7564// DEFAULT-NEXT: [[ENTRY:.*:]]7565// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tanh_f64(double noundef [[X]]) #[[ATTR13]]7566// DEFAULT-NEXT: ret double [[CALL_I]]7567//7568// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_tanh(7569// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7570// FINITEONLY-NEXT: [[ENTRY:.*:]]7571// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_tanh_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR13]]7572// FINITEONLY-NEXT: ret double [[CALL_I]]7573//7574// APPROX-LABEL: define dso_local noundef double @test_tanh(7575// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7576// APPROX-NEXT: [[ENTRY:.*:]]7577// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tanh_f64(double noundef [[X]]) #[[ATTR13]]7578// APPROX-NEXT: ret double [[CALL_I]]7579//7580// NCRDIV-LABEL: define dso_local noundef double @test_tanh(7581// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR5]] {7582// NCRDIV-NEXT: [[ENTRY:.*:]]7583// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tanh_f64(double noundef [[X]]) #[[ATTR13]]7584// NCRDIV-NEXT: ret double [[CALL_I]]7585//7586// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_tanh(7587// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {7588// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7589// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_tanh_f64(double noundef [[X]]) #[[ATTR13]]7590// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7591//7592extern "C" __device__ double test_tanh(double x) {7593 return tanh(x);7594}7595 7596// DEFAULT-LABEL: define dso_local noundef float @test_tgammaf(7597// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7598// DEFAULT-NEXT: [[ENTRY:.*:]]7599// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tgamma_f32(float noundef [[X]]) #[[ATTR14]]7600// DEFAULT-NEXT: ret float [[CALL_I]]7601//7602// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_tgammaf(7603// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7604// FINITEONLY-NEXT: [[ENTRY:.*:]]7605// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_tgamma_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7606// FINITEONLY-NEXT: ret float [[CALL_I]]7607//7608// APPROX-LABEL: define dso_local noundef float @test_tgammaf(7609// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7610// APPROX-NEXT: [[ENTRY:.*:]]7611// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tgamma_f32(float noundef [[X]]) #[[ATTR14]]7612// APPROX-NEXT: ret float [[CALL_I]]7613//7614// NCRDIV-LABEL: define dso_local noundef float @test_tgammaf(7615// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7616// NCRDIV-NEXT: [[ENTRY:.*:]]7617// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_tgamma_f32(float noundef [[X]]) #[[ATTR14]]7618// NCRDIV-NEXT: ret float [[CALL_I]]7619//7620// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_tgammaf(7621// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7622// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7623// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_tgamma_f32(float noundef [[X]]) #[[ATTR14]]7624// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7625//7626extern "C" __device__ float test_tgammaf(float x) {7627 return tgammaf(x);7628}7629 7630// DEFAULT-LABEL: define dso_local noundef double @test_tgamma(7631// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7632// DEFAULT-NEXT: [[ENTRY:.*:]]7633// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tgamma_f64(double noundef [[X]]) #[[ATTR14]]7634// DEFAULT-NEXT: ret double [[CALL_I]]7635//7636// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_tgamma(7637// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7638// FINITEONLY-NEXT: [[ENTRY:.*:]]7639// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_tgamma_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7640// FINITEONLY-NEXT: ret double [[CALL_I]]7641//7642// APPROX-LABEL: define dso_local noundef double @test_tgamma(7643// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7644// APPROX-NEXT: [[ENTRY:.*:]]7645// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tgamma_f64(double noundef [[X]]) #[[ATTR14]]7646// APPROX-NEXT: ret double [[CALL_I]]7647//7648// NCRDIV-LABEL: define dso_local noundef double @test_tgamma(7649// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7650// NCRDIV-NEXT: [[ENTRY:.*:]]7651// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_tgamma_f64(double noundef [[X]]) #[[ATTR14]]7652// NCRDIV-NEXT: ret double [[CALL_I]]7653//7654// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_tgamma(7655// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7656// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7657// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_tgamma_f64(double noundef [[X]]) #[[ATTR14]]7658// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7659//7660extern "C" __device__ double test_tgamma(double x) {7661 return tgamma(x);7662}7663 7664// DEFAULT-LABEL: define dso_local noundef float @test_truncf(7665// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7666// DEFAULT-NEXT: [[ENTRY:.*:]]7667// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.trunc.f32(float [[X]])7668// DEFAULT-NEXT: ret float [[TMP0]]7669//7670// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_truncf(7671// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7672// FINITEONLY-NEXT: [[ENTRY:.*:]]7673// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.trunc.f32(float nofpclass(nan inf) [[X]])7674// FINITEONLY-NEXT: ret float [[TMP0]]7675//7676// APPROX-LABEL: define dso_local noundef float @test_truncf(7677// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7678// APPROX-NEXT: [[ENTRY:.*:]]7679// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.trunc.f32(float [[X]])7680// APPROX-NEXT: ret float [[TMP0]]7681//7682// NCRDIV-LABEL: define dso_local noundef float @test_truncf(7683// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7684// NCRDIV-NEXT: [[ENTRY:.*:]]7685// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.trunc.f32(float [[X]])7686// NCRDIV-NEXT: ret float [[TMP0]]7687//7688// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_truncf(7689// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {7690// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7691// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.trunc.f32(float [[X]])7692// AMDGCNSPIRV-NEXT: ret float [[TMP0]]7693//7694extern "C" __device__ float test_truncf(float x) {7695 return truncf(x);7696}7697 7698// DEFAULT-LABEL: define dso_local noundef double @test_trunc(7699// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7700// DEFAULT-NEXT: [[ENTRY:.*:]]7701// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.trunc.f64(double [[X]])7702// DEFAULT-NEXT: ret double [[TMP0]]7703//7704// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_trunc(7705// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7706// FINITEONLY-NEXT: [[ENTRY:.*:]]7707// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.trunc.f64(double nofpclass(nan inf) [[X]])7708// FINITEONLY-NEXT: ret double [[TMP0]]7709//7710// APPROX-LABEL: define dso_local noundef double @test_trunc(7711// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7712// APPROX-NEXT: [[ENTRY:.*:]]7713// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.trunc.f64(double [[X]])7714// APPROX-NEXT: ret double [[TMP0]]7715//7716// NCRDIV-LABEL: define dso_local noundef double @test_trunc(7717// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {7718// NCRDIV-NEXT: [[ENTRY:.*:]]7719// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.trunc.f64(double [[X]])7720// NCRDIV-NEXT: ret double [[TMP0]]7721//7722// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_trunc(7723// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {7724// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7725// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.trunc.f64(double [[X]])7726// AMDGCNSPIRV-NEXT: ret double [[TMP0]]7727//7728extern "C" __device__ double test_trunc(double x) {7729 return trunc(x);7730}7731 7732// DEFAULT-LABEL: define dso_local noundef float @test_y0f(7733// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7734// DEFAULT-NEXT: [[ENTRY:.*:]]7735// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[X]]) #[[ATTR14]]7736// DEFAULT-NEXT: ret float [[CALL_I]]7737//7738// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_y0f(7739// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7740// FINITEONLY-NEXT: [[ENTRY:.*:]]7741// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_y0_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7742// FINITEONLY-NEXT: ret float [[CALL_I]]7743//7744// APPROX-LABEL: define dso_local noundef float @test_y0f(7745// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7746// APPROX-NEXT: [[ENTRY:.*:]]7747// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[X]]) #[[ATTR14]]7748// APPROX-NEXT: ret float [[CALL_I]]7749//7750// NCRDIV-LABEL: define dso_local noundef float @test_y0f(7751// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7752// NCRDIV-NEXT: [[ENTRY:.*:]]7753// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[X]]) #[[ATTR14]]7754// NCRDIV-NEXT: ret float [[CALL_I]]7755//7756// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_y0f(7757// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7758// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7759// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_y0_f32(float noundef [[X]]) #[[ATTR14]]7760// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7761//7762extern "C" __device__ float test_y0f(float x) {7763 return y0f(x);7764}7765 7766// DEFAULT-LABEL: define dso_local noundef double @test_y0(7767// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7768// DEFAULT-NEXT: [[ENTRY:.*:]]7769// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[X]]) #[[ATTR14]]7770// DEFAULT-NEXT: ret double [[CALL_I]]7771//7772// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_y0(7773// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7774// FINITEONLY-NEXT: [[ENTRY:.*:]]7775// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_y0_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7776// FINITEONLY-NEXT: ret double [[CALL_I]]7777//7778// APPROX-LABEL: define dso_local noundef double @test_y0(7779// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7780// APPROX-NEXT: [[ENTRY:.*:]]7781// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[X]]) #[[ATTR14]]7782// APPROX-NEXT: ret double [[CALL_I]]7783//7784// NCRDIV-LABEL: define dso_local noundef double @test_y0(7785// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7786// NCRDIV-NEXT: [[ENTRY:.*:]]7787// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[X]]) #[[ATTR14]]7788// NCRDIV-NEXT: ret double [[CALL_I]]7789//7790// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_y0(7791// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7792// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7793// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_y0_f64(double noundef [[X]]) #[[ATTR14]]7794// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7795//7796extern "C" __device__ double test_y0(double x) {7797 return y0(x);7798}7799 7800// DEFAULT-LABEL: define dso_local noundef float @test_y1f(7801// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7802// DEFAULT-NEXT: [[ENTRY:.*:]]7803// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[X]]) #[[ATTR14]]7804// DEFAULT-NEXT: ret float [[CALL_I]]7805//7806// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_y1f(7807// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7808// FINITEONLY-NEXT: [[ENTRY:.*:]]7809// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_y1_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7810// FINITEONLY-NEXT: ret float [[CALL_I]]7811//7812// APPROX-LABEL: define dso_local noundef float @test_y1f(7813// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7814// APPROX-NEXT: [[ENTRY:.*:]]7815// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[X]]) #[[ATTR14]]7816// APPROX-NEXT: ret float [[CALL_I]]7817//7818// NCRDIV-LABEL: define dso_local noundef float @test_y1f(7819// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7820// NCRDIV-NEXT: [[ENTRY:.*:]]7821// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[X]]) #[[ATTR14]]7822// NCRDIV-NEXT: ret float [[CALL_I]]7823//7824// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_y1f(7825// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7826// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7827// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_y1_f32(float noundef [[X]]) #[[ATTR14]]7828// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]7829//7830extern "C" __device__ float test_y1f(float x) {7831 return y1f(x);7832}7833 7834// DEFAULT-LABEL: define dso_local noundef double @test_y1(7835// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7836// DEFAULT-NEXT: [[ENTRY:.*:]]7837// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[X]]) #[[ATTR14]]7838// DEFAULT-NEXT: ret double [[CALL_I]]7839//7840// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_y1(7841// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7842// FINITEONLY-NEXT: [[ENTRY:.*:]]7843// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_y1_f64(double noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]7844// FINITEONLY-NEXT: ret double [[CALL_I]]7845//7846// APPROX-LABEL: define dso_local noundef double @test_y1(7847// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7848// APPROX-NEXT: [[ENTRY:.*:]]7849// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[X]]) #[[ATTR14]]7850// APPROX-NEXT: ret double [[CALL_I]]7851//7852// NCRDIV-LABEL: define dso_local noundef double @test_y1(7853// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {7854// NCRDIV-NEXT: [[ENTRY:.*:]]7855// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[X]]) #[[ATTR14]]7856// NCRDIV-NEXT: ret double [[CALL_I]]7857//7858// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_y1(7859// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {7860// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]7861// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_y1_f64(double noundef [[X]]) #[[ATTR14]]7862// AMDGCNSPIRV-NEXT: ret double [[CALL_I]]7863//7864extern "C" __device__ double test_y1(double x) {7865 return y1(x);7866}7867 7868// DEFAULT-LABEL: define dso_local float @test_ynf(7869// DEFAULT-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {7870// DEFAULT-NEXT: [[ENTRY:.*:]]7871// DEFAULT-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [7872// DEFAULT-NEXT: i32 0, label %[[IF_THEN_I:.*]]7873// DEFAULT-NEXT: i32 1, label %[[IF_THEN2_I:.*]]7874// DEFAULT-NEXT: ]7875// DEFAULT: [[IF_THEN_I]]:7876// DEFAULT-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]7877// DEFAULT-NEXT: br label %[[_ZL3YNFIF_EXIT:.*]]7878// DEFAULT: [[IF_THEN2_I]]:7879// DEFAULT-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]7880// DEFAULT-NEXT: br label %[[_ZL3YNFIF_EXIT]]7881// DEFAULT: [[IF_END4_I]]:7882// DEFAULT-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]7883// DEFAULT-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]7884// DEFAULT-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 17885// DEFAULT-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3YNFIF_EXIT]]7886// DEFAULT: [[FOR_BODY_I]]:7887// DEFAULT-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]7888// DEFAULT-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]7889// DEFAULT-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]7890// DEFAULT-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 17891// DEFAULT-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float7892// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]]7893// DEFAULT-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]7894// DEFAULT-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]7895// DEFAULT-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 17896// DEFAULT-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]7897// DEFAULT-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3YNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP24:![0-9]+]]7898// DEFAULT: [[_ZL3YNFIF_EXIT]]:7899// DEFAULT-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]7900// DEFAULT-NEXT: ret float [[RETVAL_0_I]]7901//7902// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test_ynf(7903// FINITEONLY-SAME: i32 noundef [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {7904// FINITEONLY-NEXT: [[ENTRY:.*:]]7905// FINITEONLY-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [7906// FINITEONLY-NEXT: i32 0, label %[[IF_THEN_I:.*]]7907// FINITEONLY-NEXT: i32 1, label %[[IF_THEN2_I:.*]]7908// FINITEONLY-NEXT: ]7909// FINITEONLY: [[IF_THEN_I]]:7910// FINITEONLY-NEXT: [[CALL_I20_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_y0_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]7911// FINITEONLY-NEXT: br label %[[_ZL3YNFIF_EXIT:.*]]7912// FINITEONLY: [[IF_THEN2_I]]:7913// FINITEONLY-NEXT: [[CALL_I22_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_y1_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]7914// FINITEONLY-NEXT: br label %[[_ZL3YNFIF_EXIT]]7915// FINITEONLY: [[IF_END4_I]]:7916// FINITEONLY-NEXT: [[CALL_I_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_y0_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]7917// FINITEONLY-NEXT: [[CALL_I21_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_y1_f32(float noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]7918// FINITEONLY-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 17919// FINITEONLY-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3YNFIF_EXIT]]7920// FINITEONLY: [[FOR_BODY_I]]:7921// FINITEONLY-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]7922// FINITEONLY-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]7923// FINITEONLY-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]7924// FINITEONLY-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 17925// FINITEONLY-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float7926// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract float [[CONV_I]], [[Y]]7927// FINITEONLY-NEXT: [[MUL8_I:%.*]] = fmul nnan ninf contract float [[__X1_0_I3]], [[DIV_I]]7928// FINITEONLY-NEXT: [[SUB_I]] = fsub nnan ninf contract float [[MUL8_I]], [[__X0_0_I2]]7929// FINITEONLY-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 17930// FINITEONLY-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]7931// FINITEONLY-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3YNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP24:![0-9]+]]7932// FINITEONLY: [[_ZL3YNFIF_EXIT]]:7933// FINITEONLY-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]7934// FINITEONLY-NEXT: ret float [[RETVAL_0_I]]7935//7936// APPROX-LABEL: define dso_local float @test_ynf(7937// APPROX-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {7938// APPROX-NEXT: [[ENTRY:.*:]]7939// APPROX-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [7940// APPROX-NEXT: i32 0, label %[[IF_THEN_I:.*]]7941// APPROX-NEXT: i32 1, label %[[IF_THEN2_I:.*]]7942// APPROX-NEXT: ]7943// APPROX: [[IF_THEN_I]]:7944// APPROX-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]7945// APPROX-NEXT: br label %[[_ZL3YNFIF_EXIT:.*]]7946// APPROX: [[IF_THEN2_I]]:7947// APPROX-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]7948// APPROX-NEXT: br label %[[_ZL3YNFIF_EXIT]]7949// APPROX: [[IF_END4_I]]:7950// APPROX-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]7951// APPROX-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]7952// APPROX-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 17953// APPROX-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3YNFIF_EXIT]]7954// APPROX: [[FOR_BODY_I]]:7955// APPROX-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]7956// APPROX-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]7957// APPROX-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]7958// APPROX-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 17959// APPROX-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float7960// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]]7961// APPROX-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]7962// APPROX-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]7963// APPROX-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 17964// APPROX-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]7965// APPROX-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3YNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP24:![0-9]+]]7966// APPROX: [[_ZL3YNFIF_EXIT]]:7967// APPROX-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]7968// APPROX-NEXT: ret float [[RETVAL_0_I]]7969//7970// NCRDIV-LABEL: define dso_local float @test_ynf(7971// NCRDIV-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {7972// NCRDIV-NEXT: [[ENTRY:.*:]]7973// NCRDIV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [7974// NCRDIV-NEXT: i32 0, label %[[IF_THEN_I:.*]]7975// NCRDIV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]7976// NCRDIV-NEXT: ]7977// NCRDIV: [[IF_THEN_I]]:7978// NCRDIV-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]7979// NCRDIV-NEXT: br label %[[_ZL3YNFIF_EXIT:.*]]7980// NCRDIV: [[IF_THEN2_I]]:7981// NCRDIV-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]7982// NCRDIV-NEXT: br label %[[_ZL3YNFIF_EXIT]]7983// NCRDIV: [[IF_END4_I]]:7984// NCRDIV-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]7985// NCRDIV-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]7986// NCRDIV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 17987// NCRDIV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3YNFIF_EXIT]]7988// NCRDIV: [[FOR_BODY_I]]:7989// NCRDIV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]7990// NCRDIV-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]7991// NCRDIV-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]7992// NCRDIV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 17993// NCRDIV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float7994// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]], !fpmath [[META14]]7995// NCRDIV-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]7996// NCRDIV-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]7997// NCRDIV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 17998// NCRDIV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]7999// NCRDIV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3YNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP26:![0-9]+]]8000// NCRDIV: [[_ZL3YNFIF_EXIT]]:8001// NCRDIV-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8002// NCRDIV-NEXT: ret float [[RETVAL_0_I]]8003//8004// AMDGCNSPIRV-LABEL: define spir_func float @test_ynf(8005// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {8006// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8007// AMDGCNSPIRV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [8008// AMDGCNSPIRV-NEXT: i32 0, label %[[IF_THEN_I:.*]]8009// AMDGCNSPIRV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]8010// AMDGCNSPIRV-NEXT: ]8011// AMDGCNSPIRV: [[IF_THEN_I]]:8012// AMDGCNSPIRV-NEXT: [[CALL_I20_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]8013// AMDGCNSPIRV-NEXT: br label %[[_ZL3YNFIF_EXIT:.*]]8014// AMDGCNSPIRV: [[IF_THEN2_I]]:8015// AMDGCNSPIRV-NEXT: [[CALL_I22_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]8016// AMDGCNSPIRV-NEXT: br label %[[_ZL3YNFIF_EXIT]]8017// AMDGCNSPIRV: [[IF_END4_I]]:8018// AMDGCNSPIRV-NEXT: [[CALL_I_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_y0_f32(float noundef [[Y]]) #[[ATTR14]]8019// AMDGCNSPIRV-NEXT: [[CALL_I21_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_y1_f32(float noundef [[Y]]) #[[ATTR14]]8020// AMDGCNSPIRV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 18021// AMDGCNSPIRV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL3YNFIF_EXIT]]8022// AMDGCNSPIRV: [[FOR_BODY_I]]:8023// AMDGCNSPIRV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]8024// AMDGCNSPIRV-NEXT: [[__X1_0_I3:%.*]] = phi float [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]8025// AMDGCNSPIRV-NEXT: [[__X0_0_I2:%.*]] = phi float [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]8026// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 18027// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to float8028// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[CONV_I]], [[Y]]8029// AMDGCNSPIRV-NEXT: [[MUL8_I:%.*]] = fmul contract float [[__X1_0_I3]], [[DIV_I]]8030// AMDGCNSPIRV-NEXT: [[SUB_I]] = fsub contract float [[MUL8_I]], [[__X0_0_I2]]8031// AMDGCNSPIRV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 18032// AMDGCNSPIRV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]8033// AMDGCNSPIRV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL3YNFIF_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP25:![0-9]+]]8034// AMDGCNSPIRV: [[_ZL3YNFIF_EXIT]]:8035// AMDGCNSPIRV-NEXT: [[RETVAL_0_I:%.*]] = phi float [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8036// AMDGCNSPIRV-NEXT: ret float [[RETVAL_0_I]]8037//8038extern "C" __device__ float test_ynf(int x, float y) {8039 return ynf(x, y);8040}8041 8042// DEFAULT-LABEL: define dso_local double @test_yn(8043// DEFAULT-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {8044// DEFAULT-NEXT: [[ENTRY:.*:]]8045// DEFAULT-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [8046// DEFAULT-NEXT: i32 0, label %[[IF_THEN_I:.*]]8047// DEFAULT-NEXT: i32 1, label %[[IF_THEN2_I:.*]]8048// DEFAULT-NEXT: ]8049// DEFAULT: [[IF_THEN_I]]:8050// DEFAULT-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8051// DEFAULT-NEXT: br label %[[_ZL2YNID_EXIT:.*]]8052// DEFAULT: [[IF_THEN2_I]]:8053// DEFAULT-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8054// DEFAULT-NEXT: br label %[[_ZL2YNID_EXIT]]8055// DEFAULT: [[IF_END4_I]]:8056// DEFAULT-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8057// DEFAULT-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8058// DEFAULT-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 18059// DEFAULT-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2YNID_EXIT]]8060// DEFAULT: [[FOR_BODY_I]]:8061// DEFAULT-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]8062// DEFAULT-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]8063// DEFAULT-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]8064// DEFAULT-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 18065// DEFAULT-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double8066// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]8067// DEFAULT-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]8068// DEFAULT-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]8069// DEFAULT-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 18070// DEFAULT-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]8071// DEFAULT-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2YNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP25:![0-9]+]]8072// DEFAULT: [[_ZL2YNID_EXIT]]:8073// DEFAULT-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8074// DEFAULT-NEXT: ret double [[RETVAL_0_I]]8075//8076// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test_yn(8077// FINITEONLY-SAME: i32 noundef [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {8078// FINITEONLY-NEXT: [[ENTRY:.*:]]8079// FINITEONLY-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [8080// FINITEONLY-NEXT: i32 0, label %[[IF_THEN_I:.*]]8081// FINITEONLY-NEXT: i32 1, label %[[IF_THEN2_I:.*]]8082// FINITEONLY-NEXT: ]8083// FINITEONLY: [[IF_THEN_I]]:8084// FINITEONLY-NEXT: [[CALL_I20_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_y0_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]8085// FINITEONLY-NEXT: br label %[[_ZL2YNID_EXIT:.*]]8086// FINITEONLY: [[IF_THEN2_I]]:8087// FINITEONLY-NEXT: [[CALL_I22_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_y1_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]8088// FINITEONLY-NEXT: br label %[[_ZL2YNID_EXIT]]8089// FINITEONLY: [[IF_END4_I]]:8090// FINITEONLY-NEXT: [[CALL_I_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_y0_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]8091// FINITEONLY-NEXT: [[CALL_I21_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) double @__ocml_y1_f64(double noundef nofpclass(nan inf) [[Y]]) #[[ATTR14]]8092// FINITEONLY-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 18093// FINITEONLY-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2YNID_EXIT]]8094// FINITEONLY: [[FOR_BODY_I]]:8095// FINITEONLY-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]8096// FINITEONLY-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]8097// FINITEONLY-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]8098// FINITEONLY-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 18099// FINITEONLY-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double8100// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract double [[CONV_I]], [[Y]]8101// FINITEONLY-NEXT: [[MUL8_I:%.*]] = fmul nnan ninf contract double [[__X1_0_I3]], [[DIV_I]]8102// FINITEONLY-NEXT: [[SUB_I]] = fsub nnan ninf contract double [[MUL8_I]], [[__X0_0_I2]]8103// FINITEONLY-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 18104// FINITEONLY-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]8105// FINITEONLY-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2YNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP25:![0-9]+]]8106// FINITEONLY: [[_ZL2YNID_EXIT]]:8107// FINITEONLY-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8108// FINITEONLY-NEXT: ret double [[RETVAL_0_I]]8109//8110// APPROX-LABEL: define dso_local double @test_yn(8111// APPROX-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {8112// APPROX-NEXT: [[ENTRY:.*:]]8113// APPROX-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [8114// APPROX-NEXT: i32 0, label %[[IF_THEN_I:.*]]8115// APPROX-NEXT: i32 1, label %[[IF_THEN2_I:.*]]8116// APPROX-NEXT: ]8117// APPROX: [[IF_THEN_I]]:8118// APPROX-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8119// APPROX-NEXT: br label %[[_ZL2YNID_EXIT:.*]]8120// APPROX: [[IF_THEN2_I]]:8121// APPROX-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8122// APPROX-NEXT: br label %[[_ZL2YNID_EXIT]]8123// APPROX: [[IF_END4_I]]:8124// APPROX-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8125// APPROX-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8126// APPROX-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 18127// APPROX-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2YNID_EXIT]]8128// APPROX: [[FOR_BODY_I]]:8129// APPROX-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]8130// APPROX-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]8131// APPROX-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]8132// APPROX-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 18133// APPROX-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double8134// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]8135// APPROX-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]8136// APPROX-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]8137// APPROX-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 18138// APPROX-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]8139// APPROX-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2YNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP25:![0-9]+]]8140// APPROX: [[_ZL2YNID_EXIT]]:8141// APPROX-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8142// APPROX-NEXT: ret double [[RETVAL_0_I]]8143//8144// NCRDIV-LABEL: define dso_local double @test_yn(8145// NCRDIV-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR6]] {8146// NCRDIV-NEXT: [[ENTRY:.*:]]8147// NCRDIV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [8148// NCRDIV-NEXT: i32 0, label %[[IF_THEN_I:.*]]8149// NCRDIV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]8150// NCRDIV-NEXT: ]8151// NCRDIV: [[IF_THEN_I]]:8152// NCRDIV-NEXT: [[CALL_I20_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8153// NCRDIV-NEXT: br label %[[_ZL2YNID_EXIT:.*]]8154// NCRDIV: [[IF_THEN2_I]]:8155// NCRDIV-NEXT: [[CALL_I22_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8156// NCRDIV-NEXT: br label %[[_ZL2YNID_EXIT]]8157// NCRDIV: [[IF_END4_I]]:8158// NCRDIV-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8159// NCRDIV-NEXT: [[CALL_I21_I:%.*]] = tail call contract noundef double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8160// NCRDIV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 18161// NCRDIV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2YNID_EXIT]]8162// NCRDIV: [[FOR_BODY_I]]:8163// NCRDIV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]8164// NCRDIV-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]8165// NCRDIV-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]8166// NCRDIV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 18167// NCRDIV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double8168// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]8169// NCRDIV-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]8170// NCRDIV-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]8171// NCRDIV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 18172// NCRDIV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]8173// NCRDIV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2YNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP27:![0-9]+]]8174// NCRDIV: [[_ZL2YNID_EXIT]]:8175// NCRDIV-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8176// NCRDIV-NEXT: ret double [[RETVAL_0_I]]8177//8178// AMDGCNSPIRV-LABEL: define spir_func double @test_yn(8179// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {8180// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8181// AMDGCNSPIRV-NEXT: switch i32 [[X]], label %[[IF_END4_I:.*]] [8182// AMDGCNSPIRV-NEXT: i32 0, label %[[IF_THEN_I:.*]]8183// AMDGCNSPIRV-NEXT: i32 1, label %[[IF_THEN2_I:.*]]8184// AMDGCNSPIRV-NEXT: ]8185// AMDGCNSPIRV: [[IF_THEN_I]]:8186// AMDGCNSPIRV-NEXT: [[CALL_I20_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8187// AMDGCNSPIRV-NEXT: br label %[[_ZL2YNID_EXIT:.*]]8188// AMDGCNSPIRV: [[IF_THEN2_I]]:8189// AMDGCNSPIRV-NEXT: [[CALL_I22_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8190// AMDGCNSPIRV-NEXT: br label %[[_ZL2YNID_EXIT]]8191// AMDGCNSPIRV: [[IF_END4_I]]:8192// AMDGCNSPIRV-NEXT: [[CALL_I_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_y0_f64(double noundef [[Y]]) #[[ATTR14]]8193// AMDGCNSPIRV-NEXT: [[CALL_I21_I:%.*]] = tail call contract spir_func noundef addrspace(4) double @__ocml_y1_f64(double noundef [[Y]]) #[[ATTR14]]8194// AMDGCNSPIRV-NEXT: [[CMP7_I1:%.*]] = icmp sgt i32 [[X]], 18195// AMDGCNSPIRV-NEXT: br i1 [[CMP7_I1]], label %[[FOR_BODY_I:.*]], label %[[_ZL2YNID_EXIT]]8196// AMDGCNSPIRV: [[FOR_BODY_I]]:8197// AMDGCNSPIRV-NEXT: [[__I_0_I4:%.*]] = phi i32 [ [[INC_I:%.*]], %[[FOR_BODY_I]] ], [ 1, %[[IF_END4_I]] ]8198// AMDGCNSPIRV-NEXT: [[__X1_0_I3:%.*]] = phi double [ [[SUB_I:%.*]], %[[FOR_BODY_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ]8199// AMDGCNSPIRV-NEXT: [[__X0_0_I2:%.*]] = phi double [ [[__X1_0_I3]], %[[FOR_BODY_I]] ], [ [[CALL_I_I]], %[[IF_END4_I]] ]8200// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = shl nuw nsw i32 [[__I_0_I4]], 18201// AMDGCNSPIRV-NEXT: [[CONV_I:%.*]] = uitofp nneg i32 [[MUL_I]] to double8202// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract double [[CONV_I]], [[Y]]8203// AMDGCNSPIRV-NEXT: [[MUL8_I:%.*]] = fmul contract double [[__X1_0_I3]], [[DIV_I]]8204// AMDGCNSPIRV-NEXT: [[SUB_I]] = fsub contract double [[MUL8_I]], [[__X0_0_I2]]8205// AMDGCNSPIRV-NEXT: [[INC_I]] = add nuw nsw i32 [[__I_0_I4]], 18206// AMDGCNSPIRV-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC_I]], [[X]]8207// AMDGCNSPIRV-NEXT: br i1 [[EXITCOND_NOT]], label %[[_ZL2YNID_EXIT]], label %[[FOR_BODY_I]], !llvm.loop [[LOOP26:![0-9]+]]8208// AMDGCNSPIRV: [[_ZL2YNID_EXIT]]:8209// AMDGCNSPIRV-NEXT: [[RETVAL_0_I:%.*]] = phi double [ [[CALL_I20_I]], %[[IF_THEN_I]] ], [ [[CALL_I22_I]], %[[IF_THEN2_I]] ], [ [[CALL_I21_I]], %[[IF_END4_I]] ], [ [[SUB_I]], %[[FOR_BODY_I]] ]8210// AMDGCNSPIRV-NEXT: ret double [[RETVAL_0_I]]8211//8212extern "C" __device__ double test_yn(int x, double y) {8213 return yn(x, y);8214}8215 8216// DEFAULT-LABEL: define dso_local noundef float @test___cosf(8217// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8218// DEFAULT-NEXT: [[ENTRY:.*:]]8219// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8220// DEFAULT-NEXT: ret float [[CALL_I]]8221//8222// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___cosf(8223// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8224// FINITEONLY-NEXT: [[ENTRY:.*:]]8225// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_native_cos_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]8226// FINITEONLY-NEXT: ret float [[CALL_I]]8227//8228// APPROX-LABEL: define dso_local noundef float @test___cosf(8229// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8230// APPROX-NEXT: [[ENTRY:.*:]]8231// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8232// APPROX-NEXT: ret float [[CALL_I]]8233//8234// NCRDIV-LABEL: define dso_local noundef float @test___cosf(8235// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8236// NCRDIV-NEXT: [[ENTRY:.*:]]8237// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8238// NCRDIV-NEXT: ret float [[CALL_I]]8239//8240// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___cosf(8241// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {8242// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8243// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8244// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]8245//8246extern "C" __device__ float test___cosf(float x) {8247 return __cosf(x);8248}8249 8250// DEFAULT-LABEL: define dso_local noundef float @test___exp10f(8251// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8252// DEFAULT-NEXT: [[ENTRY:.*:]]8253// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x400A934F000000008254// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8255// DEFAULT-NEXT: ret float [[TMP0]]8256//8257// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___exp10f(8258// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8259// FINITEONLY-NEXT: [[ENTRY:.*:]]8260// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract float [[X]], 0x400A934F000000008261// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8262// FINITEONLY-NEXT: ret float [[TMP0]]8263//8264// APPROX-LABEL: define dso_local noundef float @test___exp10f(8265// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8266// APPROX-NEXT: [[ENTRY:.*:]]8267// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x400A934F000000008268// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8269// APPROX-NEXT: ret float [[TMP0]]8270//8271// NCRDIV-LABEL: define dso_local noundef float @test___exp10f(8272// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8273// NCRDIV-NEXT: [[ENTRY:.*:]]8274// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x400A934F000000008275// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8276// NCRDIV-NEXT: ret float [[TMP0]]8277//8278// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___exp10f(8279// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8280// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8281// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x400A934F000000008282// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8283// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8284//8285extern "C" __device__ float test___exp10f(float x) {8286 return __exp10f(x);8287}8288 8289// DEFAULT-LABEL: define dso_local noundef float @test___expf(8290// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8291// DEFAULT-NEXT: [[ENTRY:.*:]]8292// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x3FF71547600000008293// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8294// DEFAULT-NEXT: ret float [[TMP0]]8295//8296// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___expf(8297// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8298// FINITEONLY-NEXT: [[ENTRY:.*:]]8299// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract float [[X]], 0x3FF71547600000008300// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8301// FINITEONLY-NEXT: ret float [[TMP0]]8302//8303// APPROX-LABEL: define dso_local noundef float @test___expf(8304// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8305// APPROX-NEXT: [[ENTRY:.*:]]8306// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x3FF71547600000008307// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8308// APPROX-NEXT: ret float [[TMP0]]8309//8310// NCRDIV-LABEL: define dso_local noundef float @test___expf(8311// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8312// NCRDIV-NEXT: [[ENTRY:.*:]]8313// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x3FF71547600000008314// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8315// NCRDIV-NEXT: ret float [[TMP0]]8316//8317// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___expf(8318// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8319// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8320// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], 0x3FF71547600000008321// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.amdgcn.exp2.f32(float [[MUL_I]])8322// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8323//8324extern "C" __device__ float test___expf(float x) {8325 return __expf(x);8326}8327 8328// DEFAULT-LABEL: define dso_local noundef float @test___fadd_rn(8329// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8330// DEFAULT-NEXT: [[ENTRY:.*:]]8331// DEFAULT-NEXT: [[ADD_I:%.*]] = fadd contract float [[X]], [[Y]]8332// DEFAULT-NEXT: ret float [[ADD_I]]8333//8334// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___fadd_rn(8335// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8336// FINITEONLY-NEXT: [[ENTRY:.*:]]8337// FINITEONLY-NEXT: [[ADD_I:%.*]] = fadd nnan ninf contract float [[X]], [[Y]]8338// FINITEONLY-NEXT: ret float [[ADD_I]]8339//8340// APPROX-LABEL: define dso_local noundef float @test___fadd_rn(8341// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8342// APPROX-NEXT: [[ENTRY:.*:]]8343// APPROX-NEXT: [[ADD_I:%.*]] = fadd contract float [[X]], [[Y]]8344// APPROX-NEXT: ret float [[ADD_I]]8345//8346// NCRDIV-LABEL: define dso_local noundef float @test___fadd_rn(8347// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8348// NCRDIV-NEXT: [[ENTRY:.*:]]8349// NCRDIV-NEXT: [[ADD_I:%.*]] = fadd contract float [[X]], [[Y]]8350// NCRDIV-NEXT: ret float [[ADD_I]]8351//8352// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___fadd_rn(8353// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8354// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8355// AMDGCNSPIRV-NEXT: [[ADD_I:%.*]] = fadd contract float [[X]], [[Y]]8356// AMDGCNSPIRV-NEXT: ret float [[ADD_I]]8357//8358extern "C" __device__ float test___fadd_rn(float x, float y) {8359 return __fadd_rn(x, y);8360}8361 8362// DEFAULT-LABEL: define dso_local noundef float @test___fdividef(8363// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8364// DEFAULT-NEXT: [[ENTRY:.*:]]8365// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]]8366// DEFAULT-NEXT: ret float [[DIV_I]]8367//8368// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___fdividef(8369// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8370// FINITEONLY-NEXT: [[ENTRY:.*:]]8371// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract float [[X]], [[Y]]8372// FINITEONLY-NEXT: ret float [[DIV_I]]8373//8374// APPROX-LABEL: define dso_local noundef float @test___fdividef(8375// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8376// APPROX-NEXT: [[ENTRY:.*:]]8377// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]]8378// APPROX-NEXT: ret float [[DIV_I]]8379//8380// NCRDIV-LABEL: define dso_local noundef float @test___fdividef(8381// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8382// NCRDIV-NEXT: [[ENTRY:.*:]]8383// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]], !fpmath [[META14]]8384// NCRDIV-NEXT: ret float [[DIV_I]]8385//8386// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___fdividef(8387// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8388// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8389// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract float [[X]], [[Y]]8390// AMDGCNSPIRV-NEXT: ret float [[DIV_I]]8391//8392extern "C" __device__ float test___fdividef(float x, float y) {8393 return __fdividef(x, y);8394}8395 8396// DEFAULT-LABEL: define dso_local noundef float @test__fmaf_rn(8397// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {8398// DEFAULT-NEXT: [[ENTRY:.*:]]8399// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])8400// DEFAULT-NEXT: ret float [[TMP0]]8401//8402// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test__fmaf_rn(8403// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]], float noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {8404// FINITEONLY-NEXT: [[ENTRY:.*:]]8405// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.fma.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]], float nofpclass(nan inf) [[Z]])8406// FINITEONLY-NEXT: ret float [[TMP0]]8407//8408// APPROX-LABEL: define dso_local noundef float @test__fmaf_rn(8409// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {8410// APPROX-NEXT: [[ENTRY:.*:]]8411// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])8412// APPROX-NEXT: ret float [[TMP0]]8413//8414// NCRDIV-LABEL: define dso_local noundef float @test__fmaf_rn(8415// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {8416// NCRDIV-NEXT: [[ENTRY:.*:]]8417// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])8418// NCRDIV-NEXT: ret float [[TMP0]]8419//8420// AMDGCNSPIRV-LABEL: define spir_func noundef float @test__fmaf_rn(8421// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]], float noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8422// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8423// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])8424// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8425//8426extern "C" __device__ float test__fmaf_rn(float x, float y, float z) {8427 return __fmaf_rn(x, y, z);8428}8429 8430// DEFAULT-LABEL: define dso_local noundef float @test___fmul_rn(8431// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8432// DEFAULT-NEXT: [[ENTRY:.*:]]8433// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], [[Y]]8434// DEFAULT-NEXT: ret float [[MUL_I]]8435//8436// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___fmul_rn(8437// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8438// FINITEONLY-NEXT: [[ENTRY:.*:]]8439// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract float [[X]], [[Y]]8440// FINITEONLY-NEXT: ret float [[MUL_I]]8441//8442// APPROX-LABEL: define dso_local noundef float @test___fmul_rn(8443// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8444// APPROX-NEXT: [[ENTRY:.*:]]8445// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], [[Y]]8446// APPROX-NEXT: ret float [[MUL_I]]8447//8448// NCRDIV-LABEL: define dso_local noundef float @test___fmul_rn(8449// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8450// NCRDIV-NEXT: [[ENTRY:.*:]]8451// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], [[Y]]8452// NCRDIV-NEXT: ret float [[MUL_I]]8453//8454// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___fmul_rn(8455// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8456// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8457// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract float [[X]], [[Y]]8458// AMDGCNSPIRV-NEXT: ret float [[MUL_I]]8459//8460extern "C" __device__ float test___fmul_rn(float x, float y) {8461 return __fmul_rn(x, y);8462}8463 8464// DEFAULT-LABEL: define dso_local noundef float @test___frcp_rn(8465// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8466// DEFAULT-NEXT: [[ENTRY:.*:]]8467// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract float 1.000000e+00, [[X]]8468// DEFAULT-NEXT: ret float [[DIV_I]]8469//8470// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___frcp_rn(8471// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8472// FINITEONLY-NEXT: [[ENTRY:.*:]]8473// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract float 1.000000e+00, [[X]]8474// FINITEONLY-NEXT: ret float [[DIV_I]]8475//8476// APPROX-LABEL: define dso_local noundef float @test___frcp_rn(8477// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8478// APPROX-NEXT: [[ENTRY:.*:]]8479// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract float 1.000000e+00, [[X]]8480// APPROX-NEXT: ret float [[DIV_I]]8481//8482// NCRDIV-LABEL: define dso_local noundef float @test___frcp_rn(8483// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8484// NCRDIV-NEXT: [[ENTRY:.*:]]8485// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract float 1.000000e+00, [[X]], !fpmath [[META14]]8486// NCRDIV-NEXT: ret float [[DIV_I]]8487//8488// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___frcp_rn(8489// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8490// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8491// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract float 1.000000e+00, [[X]]8492// AMDGCNSPIRV-NEXT: ret float [[DIV_I]]8493//8494extern "C" __device__ float test___frcp_rn(float x) {8495 return __frcp_rn(x);8496}8497 8498// DEFAULT-LABEL: define dso_local noundef float @test___frsqrt_rn(8499// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8500// DEFAULT-NEXT: [[ENTRY:.*:]]8501// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.rsq.f32(float [[X]])8502// DEFAULT-NEXT: ret float [[TMP0]]8503//8504// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___frsqrt_rn(8505// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8506// FINITEONLY-NEXT: [[ENTRY:.*:]]8507// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.amdgcn.rsq.f32(float nofpclass(nan inf) [[X]])8508// FINITEONLY-NEXT: ret float [[TMP0]]8509//8510// APPROX-LABEL: define dso_local noundef float @test___frsqrt_rn(8511// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8512// APPROX-NEXT: [[ENTRY:.*:]]8513// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.rsq.f32(float [[X]])8514// APPROX-NEXT: ret float [[TMP0]]8515//8516// NCRDIV-LABEL: define dso_local noundef float @test___frsqrt_rn(8517// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8518// NCRDIV-NEXT: [[ENTRY:.*:]]8519// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.rsq.f32(float [[X]])8520// NCRDIV-NEXT: ret float [[TMP0]]8521//8522// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___frsqrt_rn(8523// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8524// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8525// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.amdgcn.rsq.f32(float [[X]])8526// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8527//8528extern "C" __device__ float test___frsqrt_rn(float x) {8529 return __frsqrt_rn(x);8530}8531 8532// DEFAULT-LABEL: define dso_local noundef float @test___fsqrt_rn(8533// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {8534// DEFAULT-NEXT: [[ENTRY:.*:]]8535// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_sqrt_f32(float noundef [[X]]) #[[ATTR12]]8536// DEFAULT-NEXT: ret float [[CALL_I]]8537//8538// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___fsqrt_rn(8539// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {8540// FINITEONLY-NEXT: [[ENTRY:.*:]]8541// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_native_sqrt_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR12]]8542// FINITEONLY-NEXT: ret float [[CALL_I]]8543//8544// APPROX-LABEL: define dso_local noundef float @test___fsqrt_rn(8545// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {8546// APPROX-NEXT: [[ENTRY:.*:]]8547// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_sqrt_f32(float noundef [[X]]) #[[ATTR12]]8548// APPROX-NEXT: ret float [[CALL_I]]8549//8550// NCRDIV-LABEL: define dso_local noundef float @test___fsqrt_rn(8551// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR4]] {8552// NCRDIV-NEXT: [[ENTRY:.*:]]8553// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_sqrt_f32(float noundef [[X]]) #[[ATTR12]]8554// NCRDIV-NEXT: ret float [[CALL_I]]8555//8556// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___fsqrt_rn(8557// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR4]] {8558// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8559// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_native_sqrt_f32(float noundef [[X]]) #[[ATTR12]]8560// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]8561//8562extern "C" __device__ float test___fsqrt_rn(float x) {8563 return __fsqrt_rn(x);8564}8565 8566// DEFAULT-LABEL: define dso_local noundef float @test___fsub_rn(8567// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8568// DEFAULT-NEXT: [[ENTRY:.*:]]8569// DEFAULT-NEXT: [[SUB_I:%.*]] = fsub contract float [[X]], [[Y]]8570// DEFAULT-NEXT: ret float [[SUB_I]]8571//8572// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___fsub_rn(8573// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8574// FINITEONLY-NEXT: [[ENTRY:.*:]]8575// FINITEONLY-NEXT: [[SUB_I:%.*]] = fsub nnan ninf contract float [[X]], [[Y]]8576// FINITEONLY-NEXT: ret float [[SUB_I]]8577//8578// APPROX-LABEL: define dso_local noundef float @test___fsub_rn(8579// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8580// APPROX-NEXT: [[ENTRY:.*:]]8581// APPROX-NEXT: [[SUB_I:%.*]] = fsub contract float [[X]], [[Y]]8582// APPROX-NEXT: ret float [[SUB_I]]8583//8584// NCRDIV-LABEL: define dso_local noundef float @test___fsub_rn(8585// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8586// NCRDIV-NEXT: [[ENTRY:.*:]]8587// NCRDIV-NEXT: [[SUB_I:%.*]] = fsub contract float [[X]], [[Y]]8588// NCRDIV-NEXT: ret float [[SUB_I]]8589//8590// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___fsub_rn(8591// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8592// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8593// AMDGCNSPIRV-NEXT: [[SUB_I:%.*]] = fsub contract float [[X]], [[Y]]8594// AMDGCNSPIRV-NEXT: ret float [[SUB_I]]8595//8596extern "C" __device__ float test___fsub_rn(float x, float y) {8597 return __fsub_rn(x, y);8598}8599 8600// DEFAULT-LABEL: define dso_local noundef float @test___log10f(8601// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8602// DEFAULT-NEXT: [[ENTRY:.*:]]8603// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log10.f32(float [[X]])8604// DEFAULT-NEXT: ret float [[TMP0]]8605//8606// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___log10f(8607// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8608// FINITEONLY-NEXT: [[ENTRY:.*:]]8609// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.log10.f32(float nofpclass(nan inf) [[X]])8610// FINITEONLY-NEXT: ret float [[TMP0]]8611//8612// APPROX-LABEL: define dso_local noundef float @test___log10f(8613// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8614// APPROX-NEXT: [[ENTRY:.*:]]8615// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log10.f32(float [[X]])8616// APPROX-NEXT: ret float [[TMP0]]8617//8618// NCRDIV-LABEL: define dso_local noundef float @test___log10f(8619// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8620// NCRDIV-NEXT: [[ENTRY:.*:]]8621// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log10.f32(float [[X]])8622// NCRDIV-NEXT: ret float [[TMP0]]8623//8624// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___log10f(8625// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8626// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8627// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.log10.f32(float [[X]])8628// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8629//8630extern "C" __device__ float test___log10f(float x) {8631 return __log10f(x);8632}8633 8634// DEFAULT-LABEL: define dso_local noundef float @test___log2f(8635// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8636// DEFAULT-NEXT: [[ENTRY:.*:]]8637// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.log.f32(float [[X]])8638// DEFAULT-NEXT: ret float [[TMP0]]8639//8640// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___log2f(8641// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8642// FINITEONLY-NEXT: [[ENTRY:.*:]]8643// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.amdgcn.log.f32(float nofpclass(nan inf) [[X]])8644// FINITEONLY-NEXT: ret float [[TMP0]]8645//8646// APPROX-LABEL: define dso_local noundef float @test___log2f(8647// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8648// APPROX-NEXT: [[ENTRY:.*:]]8649// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.log.f32(float [[X]])8650// APPROX-NEXT: ret float [[TMP0]]8651//8652// NCRDIV-LABEL: define dso_local noundef float @test___log2f(8653// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8654// NCRDIV-NEXT: [[ENTRY:.*:]]8655// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.amdgcn.log.f32(float [[X]])8656// NCRDIV-NEXT: ret float [[TMP0]]8657//8658// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___log2f(8659// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8660// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8661// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.amdgcn.log.f32(float [[X]])8662// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8663//8664extern "C" __device__ float test___log2f(float x) {8665 return __log2f(x);8666}8667 8668// DEFAULT-LABEL: define dso_local noundef float @test___logf(8669// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8670// DEFAULT-NEXT: [[ENTRY:.*:]]8671// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log.f32(float [[X]])8672// DEFAULT-NEXT: ret float [[TMP0]]8673//8674// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___logf(8675// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8676// FINITEONLY-NEXT: [[ENTRY:.*:]]8677// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.log.f32(float nofpclass(nan inf) [[X]])8678// FINITEONLY-NEXT: ret float [[TMP0]]8679//8680// APPROX-LABEL: define dso_local noundef float @test___logf(8681// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8682// APPROX-NEXT: [[ENTRY:.*:]]8683// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log.f32(float [[X]])8684// APPROX-NEXT: ret float [[TMP0]]8685//8686// NCRDIV-LABEL: define dso_local noundef float @test___logf(8687// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8688// NCRDIV-NEXT: [[ENTRY:.*:]]8689// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.log.f32(float [[X]])8690// NCRDIV-NEXT: ret float [[TMP0]]8691//8692// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___logf(8693// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8694// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8695// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.log.f32(float [[X]])8696// AMDGCNSPIRV-NEXT: ret float [[TMP0]]8697//8698extern "C" __device__ float test___logf(float x) {8699 return __logf(x);8700}8701 8702// DEFAULT-LABEL: define dso_local noundef float @test___powf(8703// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {8704// DEFAULT-NEXT: [[ENTRY:.*:]]8705// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]8706// DEFAULT-NEXT: ret float [[CALL_I]]8707//8708// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___powf(8709// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {8710// FINITEONLY-NEXT: [[ENTRY:.*:]]8711// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_pow_f32(float noundef nofpclass(nan inf) [[X]], float noundef nofpclass(nan inf) [[Y]]) #[[ATTR13]]8712// FINITEONLY-NEXT: ret float [[CALL_I]]8713//8714// APPROX-LABEL: define dso_local noundef float @test___powf(8715// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {8716// APPROX-NEXT: [[ENTRY:.*:]]8717// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]8718// APPROX-NEXT: ret float [[CALL_I]]8719//8720// NCRDIV-LABEL: define dso_local noundef float @test___powf(8721// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR5]] {8722// NCRDIV-NEXT: [[ENTRY:.*:]]8723// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]8724// NCRDIV-NEXT: ret float [[CALL_I]]8725//8726// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___powf(8727// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR5]] {8728// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8729// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_pow_f32(float noundef [[X]], float noundef [[Y]]) #[[ATTR13]]8730// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]8731//8732extern "C" __device__ float test___powf(float x, float y) {8733 return __powf(x, y);8734}8735 8736// DEFAULT-LABEL: define dso_local noundef float @test___saturatef(8737// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8738// DEFAULT-NEXT: [[ENTRY:.*:]]8739// DEFAULT-NEXT: [[CMP_I:%.*]] = fcmp contract olt float [[X]], 0.000000e+008740// DEFAULT-NEXT: [[CMP1_I:%.*]] = fcmp contract ogt float [[X]], 1.000000e+008741// DEFAULT-NEXT: [[COND_I:%.*]] = select contract i1 [[CMP1_I]], float 1.000000e+00, float [[X]]8742// DEFAULT-NEXT: [[COND5_I:%.*]] = select contract i1 [[CMP_I]], float 0.000000e+00, float [[COND_I]]8743// DEFAULT-NEXT: ret float [[COND5_I]]8744//8745// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___saturatef(8746// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8747// FINITEONLY-NEXT: [[ENTRY:.*:]]8748// FINITEONLY-NEXT: [[CMP_I:%.*]] = fcmp nnan ninf contract olt float [[X]], 0.000000e+008749// FINITEONLY-NEXT: [[CMP1_I:%.*]] = fcmp nnan ninf contract ogt float [[X]], 1.000000e+008750// FINITEONLY-NEXT: [[COND_I:%.*]] = select nnan ninf contract i1 [[CMP1_I]], float 1.000000e+00, float [[X]]8751// FINITEONLY-NEXT: [[COND5_I:%.*]] = select nnan ninf contract i1 [[CMP_I]], float 0.000000e+00, float [[COND_I]]8752// FINITEONLY-NEXT: ret float [[COND5_I]]8753//8754// APPROX-LABEL: define dso_local noundef float @test___saturatef(8755// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8756// APPROX-NEXT: [[ENTRY:.*:]]8757// APPROX-NEXT: [[CMP_I:%.*]] = fcmp contract olt float [[X]], 0.000000e+008758// APPROX-NEXT: [[CMP1_I:%.*]] = fcmp contract ogt float [[X]], 1.000000e+008759// APPROX-NEXT: [[COND_I:%.*]] = select contract i1 [[CMP1_I]], float 1.000000e+00, float [[X]]8760// APPROX-NEXT: [[COND5_I:%.*]] = select contract i1 [[CMP_I]], float 0.000000e+00, float [[COND_I]]8761// APPROX-NEXT: ret float [[COND5_I]]8762//8763// NCRDIV-LABEL: define dso_local noundef float @test___saturatef(8764// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {8765// NCRDIV-NEXT: [[ENTRY:.*:]]8766// NCRDIV-NEXT: [[CMP_I:%.*]] = fcmp contract olt float [[X]], 0.000000e+008767// NCRDIV-NEXT: [[CMP1_I:%.*]] = fcmp contract ogt float [[X]], 1.000000e+008768// NCRDIV-NEXT: [[COND_I:%.*]] = select contract i1 [[CMP1_I]], float 1.000000e+00, float [[X]]8769// NCRDIV-NEXT: [[COND5_I:%.*]] = select contract i1 [[CMP_I]], float 0.000000e+00, float [[COND_I]]8770// NCRDIV-NEXT: ret float [[COND5_I]]8771//8772// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___saturatef(8773// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8774// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8775// AMDGCNSPIRV-NEXT: [[CMP_I:%.*]] = fcmp contract olt float [[X]], 0.000000e+008776// AMDGCNSPIRV-NEXT: [[CMP1_I:%.*]] = fcmp contract ogt float [[X]], 1.000000e+008777// AMDGCNSPIRV-NEXT: [[COND_I:%.*]] = select contract i1 [[CMP1_I]], float 1.000000e+00, float [[X]]8778// AMDGCNSPIRV-NEXT: [[COND5_I:%.*]] = select contract i1 [[CMP_I]], float 0.000000e+00, float [[COND_I]]8779// AMDGCNSPIRV-NEXT: ret float [[COND5_I]]8780//8781extern "C" __device__ float test___saturatef(float x) {8782 return __saturatef(x);8783}8784 8785// DEFAULT-LABEL: define dso_local void @test___sincosf(8786// DEFAULT-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {8787// DEFAULT-NEXT: [[ENTRY:.*:]]8788// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8789// DEFAULT-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]8790// DEFAULT-NEXT: [[CALL1_I:%.*]] = tail call contract float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8791// DEFAULT-NEXT: store float [[CALL1_I]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]8792// DEFAULT-NEXT: ret void8793//8794// FINITEONLY-LABEL: define dso_local void @test___sincosf(8795// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {8796// FINITEONLY-NEXT: [[ENTRY:.*:]]8797// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract nofpclass(nan inf) float @__ocml_native_sin_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]8798// FINITEONLY-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]8799// FINITEONLY-NEXT: [[CALL1_I:%.*]] = tail call nnan ninf contract nofpclass(nan inf) float @__ocml_native_cos_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]8800// FINITEONLY-NEXT: store float [[CALL1_I]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]8801// FINITEONLY-NEXT: ret void8802//8803// APPROX-LABEL: define dso_local void @test___sincosf(8804// APPROX-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {8805// APPROX-NEXT: [[ENTRY:.*:]]8806// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8807// APPROX-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA16]]8808// APPROX-NEXT: [[CALL1_I:%.*]] = tail call contract float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8809// APPROX-NEXT: store float [[CALL1_I]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA16]]8810// APPROX-NEXT: ret void8811//8812// NCRDIV-LABEL: define dso_local void @test___sincosf(8813// NCRDIV-SAME: float noundef [[X:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr #[[ATTR6]] {8814// NCRDIV-NEXT: [[ENTRY:.*:]]8815// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8816// NCRDIV-NEXT: store float [[CALL_I]], ptr [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]8817// NCRDIV-NEXT: [[CALL1_I:%.*]] = tail call contract float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8818// NCRDIV-NEXT: store float [[CALL1_I]], ptr [[Z]], align 4, !tbaa [[FLOAT_TBAA17]]8819// NCRDIV-NEXT: ret void8820//8821// AMDGCNSPIRV-LABEL: define spir_func void @test___sincosf(8822// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Y:%.*]], ptr addrspace(4) noundef writeonly captures(none) initializes((0, 4)) [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {8823// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8824// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func addrspace(4) float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8825// AMDGCNSPIRV-NEXT: store float [[CALL_I]], ptr addrspace(4) [[Y]], align 4, !tbaa [[FLOAT_TBAA17]]8826// AMDGCNSPIRV-NEXT: [[CALL1_I:%.*]] = tail call contract spir_func addrspace(4) float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8827// AMDGCNSPIRV-NEXT: store float [[CALL1_I]], ptr addrspace(4) [[Z]], align 4, !tbaa [[FLOAT_TBAA17]]8828// AMDGCNSPIRV-NEXT: ret void8829//8830extern "C" __device__ void test___sincosf(float x, float *y, float *z) {8831 __sincosf(x, y, z);8832}8833 8834// DEFAULT-LABEL: define dso_local noundef float @test___sinf(8835// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8836// DEFAULT-NEXT: [[ENTRY:.*:]]8837// DEFAULT-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8838// DEFAULT-NEXT: ret float [[CALL_I]]8839//8840// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test___sinf(8841// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8842// FINITEONLY-NEXT: [[ENTRY:.*:]]8843// FINITEONLY-NEXT: [[CALL_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_native_sin_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]8844// FINITEONLY-NEXT: ret float [[CALL_I]]8845//8846// APPROX-LABEL: define dso_local noundef float @test___sinf(8847// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8848// APPROX-NEXT: [[ENTRY:.*:]]8849// APPROX-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8850// APPROX-NEXT: ret float [[CALL_I]]8851//8852// NCRDIV-LABEL: define dso_local noundef float @test___sinf(8853// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8854// NCRDIV-NEXT: [[ENTRY:.*:]]8855// NCRDIV-NEXT: [[CALL_I:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8856// NCRDIV-NEXT: ret float [[CALL_I]]8857//8858// AMDGCNSPIRV-LABEL: define spir_func noundef float @test___sinf(8859// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {8860// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8861// AMDGCNSPIRV-NEXT: [[CALL_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8862// AMDGCNSPIRV-NEXT: ret float [[CALL_I]]8863//8864extern "C" __device__ float test___sinf(float x) {8865 return __sinf(x);8866}8867 8868// DEFAULT-LABEL: define dso_local float @test___tanf(8869// DEFAULT-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8870// DEFAULT-NEXT: [[ENTRY:.*:]]8871// DEFAULT-NEXT: [[CALL_I3_I:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8872// DEFAULT-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8873// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.amdgcn.rcp.f32(float [[CALL_I_I]])8874// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract float [[CALL_I3_I]], [[TMP0]]8875// DEFAULT-NEXT: ret float [[MUL_I]]8876//8877// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @test___tanf(8878// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8879// FINITEONLY-NEXT: [[ENTRY:.*:]]8880// FINITEONLY-NEXT: [[CALL_I3_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_native_sin_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]8881// FINITEONLY-NEXT: [[CALL_I_I:%.*]] = tail call nnan ninf contract noundef nofpclass(nan inf) float @__ocml_native_cos_f32(float noundef nofpclass(nan inf) [[X]]) #[[ATTR14]]8882// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract float @llvm.amdgcn.rcp.f32(float [[CALL_I_I]])8883// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract float [[CALL_I3_I]], [[TMP0]]8884// FINITEONLY-NEXT: ret float [[MUL_I]]8885//8886// APPROX-LABEL: define dso_local float @test___tanf(8887// APPROX-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8888// APPROX-NEXT: [[ENTRY:.*:]]8889// APPROX-NEXT: [[CALL_I3_I:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8890// APPROX-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8891// APPROX-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.amdgcn.rcp.f32(float [[CALL_I_I]])8892// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract float [[CALL_I3_I]], [[TMP0]]8893// APPROX-NEXT: ret float [[MUL_I]]8894//8895// NCRDIV-LABEL: define dso_local float @test___tanf(8896// NCRDIV-SAME: float noundef [[X:%.*]]) local_unnamed_addr #[[ATTR6]] {8897// NCRDIV-NEXT: [[ENTRY:.*:]]8898// NCRDIV-NEXT: [[CALL_I3_I:%.*]] = tail call contract noundef float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8899// NCRDIV-NEXT: [[CALL_I_I:%.*]] = tail call contract noundef float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8900// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract float @llvm.amdgcn.rcp.f32(float [[CALL_I_I]])8901// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract float [[CALL_I3_I]], [[TMP0]]8902// NCRDIV-NEXT: ret float [[MUL_I]]8903//8904// AMDGCNSPIRV-LABEL: define spir_func float @test___tanf(8905// AMDGCNSPIRV-SAME: float noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR6]] {8906// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8907// AMDGCNSPIRV-NEXT: [[CALL_I3_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_native_sin_f32(float noundef [[X]]) #[[ATTR14]]8908// AMDGCNSPIRV-NEXT: [[CALL_I_I:%.*]] = tail call contract spir_func noundef addrspace(4) float @__ocml_native_cos_f32(float noundef [[X]]) #[[ATTR14]]8909// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract addrspace(4) float @llvm.amdgcn.rcp.f32(float [[CALL_I_I]])8910// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract float [[CALL_I3_I]], [[TMP0]]8911// AMDGCNSPIRV-NEXT: ret float [[MUL_I]]8912//8913extern "C" __device__ float test___tanf(float x) {8914 return __tanf(x);8915}8916 8917// DEFAULT-LABEL: define dso_local noundef double @test___dadd_rn(8918// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8919// DEFAULT-NEXT: [[ENTRY:.*:]]8920// DEFAULT-NEXT: [[ADD_I:%.*]] = fadd contract double [[X]], [[Y]]8921// DEFAULT-NEXT: ret double [[ADD_I]]8922//8923// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test___dadd_rn(8924// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8925// FINITEONLY-NEXT: [[ENTRY:.*:]]8926// FINITEONLY-NEXT: [[ADD_I:%.*]] = fadd nnan ninf contract double [[X]], [[Y]]8927// FINITEONLY-NEXT: ret double [[ADD_I]]8928//8929// APPROX-LABEL: define dso_local noundef double @test___dadd_rn(8930// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8931// APPROX-NEXT: [[ENTRY:.*:]]8932// APPROX-NEXT: [[ADD_I:%.*]] = fadd contract double [[X]], [[Y]]8933// APPROX-NEXT: ret double [[ADD_I]]8934//8935// NCRDIV-LABEL: define dso_local noundef double @test___dadd_rn(8936// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8937// NCRDIV-NEXT: [[ENTRY:.*:]]8938// NCRDIV-NEXT: [[ADD_I:%.*]] = fadd contract double [[X]], [[Y]]8939// NCRDIV-NEXT: ret double [[ADD_I]]8940//8941// AMDGCNSPIRV-LABEL: define spir_func noundef double @test___dadd_rn(8942// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8943// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8944// AMDGCNSPIRV-NEXT: [[ADD_I:%.*]] = fadd contract double [[X]], [[Y]]8945// AMDGCNSPIRV-NEXT: ret double [[ADD_I]]8946//8947extern "C" __device__ double test___dadd_rn(double x, double y) {8948 return __dadd_rn(x, y);8949}8950 8951// DEFAULT-LABEL: define dso_local noundef double @test___ddiv_rn(8952// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8953// DEFAULT-NEXT: [[ENTRY:.*:]]8954// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract double [[X]], [[Y]]8955// DEFAULT-NEXT: ret double [[DIV_I]]8956//8957// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test___ddiv_rn(8958// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8959// FINITEONLY-NEXT: [[ENTRY:.*:]]8960// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract double [[X]], [[Y]]8961// FINITEONLY-NEXT: ret double [[DIV_I]]8962//8963// APPROX-LABEL: define dso_local noundef double @test___ddiv_rn(8964// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8965// APPROX-NEXT: [[ENTRY:.*:]]8966// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract double [[X]], [[Y]]8967// APPROX-NEXT: ret double [[DIV_I]]8968//8969// NCRDIV-LABEL: define dso_local noundef double @test___ddiv_rn(8970// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8971// NCRDIV-NEXT: [[ENTRY:.*:]]8972// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract double [[X]], [[Y]]8973// NCRDIV-NEXT: ret double [[DIV_I]]8974//8975// AMDGCNSPIRV-LABEL: define spir_func noundef double @test___ddiv_rn(8976// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {8977// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]8978// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract double [[X]], [[Y]]8979// AMDGCNSPIRV-NEXT: ret double [[DIV_I]]8980//8981extern "C" __device__ double test___ddiv_rn(double x, double y) {8982 return __ddiv_rn(x, y);8983}8984 8985// DEFAULT-LABEL: define dso_local noundef double @test___dmul_rn(8986// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8987// DEFAULT-NEXT: [[ENTRY:.*:]]8988// DEFAULT-NEXT: [[MUL_I:%.*]] = fmul contract double [[X]], [[Y]]8989// DEFAULT-NEXT: ret double [[MUL_I]]8990//8991// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test___dmul_rn(8992// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8993// FINITEONLY-NEXT: [[ENTRY:.*:]]8994// FINITEONLY-NEXT: [[MUL_I:%.*]] = fmul nnan ninf contract double [[X]], [[Y]]8995// FINITEONLY-NEXT: ret double [[MUL_I]]8996//8997// APPROX-LABEL: define dso_local noundef double @test___dmul_rn(8998// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {8999// APPROX-NEXT: [[ENTRY:.*:]]9000// APPROX-NEXT: [[MUL_I:%.*]] = fmul contract double [[X]], [[Y]]9001// APPROX-NEXT: ret double [[MUL_I]]9002//9003// NCRDIV-LABEL: define dso_local noundef double @test___dmul_rn(9004// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9005// NCRDIV-NEXT: [[ENTRY:.*:]]9006// NCRDIV-NEXT: [[MUL_I:%.*]] = fmul contract double [[X]], [[Y]]9007// NCRDIV-NEXT: ret double [[MUL_I]]9008//9009// AMDGCNSPIRV-LABEL: define spir_func noundef double @test___dmul_rn(9010// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9011// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9012// AMDGCNSPIRV-NEXT: [[MUL_I:%.*]] = fmul contract double [[X]], [[Y]]9013// AMDGCNSPIRV-NEXT: ret double [[MUL_I]]9014//9015extern "C" __device__ double test___dmul_rn(double x, double y) {9016 return __dmul_rn(x, y);9017}9018 9019// DEFAULT-LABEL: define dso_local noundef double @test___drcp_rn(9020// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9021// DEFAULT-NEXT: [[ENTRY:.*:]]9022// DEFAULT-NEXT: [[DIV_I:%.*]] = fdiv contract double 1.000000e+00, [[X]]9023// DEFAULT-NEXT: ret double [[DIV_I]]9024//9025// FINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @test___drcp_rn(9026// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9027// FINITEONLY-NEXT: [[ENTRY:.*:]]9028// FINITEONLY-NEXT: [[DIV_I:%.*]] = fdiv nnan ninf contract double 1.000000e+00, [[X]]9029// FINITEONLY-NEXT: ret double [[DIV_I]]9030//9031// APPROX-LABEL: define dso_local noundef double @test___drcp_rn(9032// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9033// APPROX-NEXT: [[ENTRY:.*:]]9034// APPROX-NEXT: [[DIV_I:%.*]] = fdiv contract double 1.000000e+00, [[X]]9035// APPROX-NEXT: ret double [[DIV_I]]9036//9037// NCRDIV-LABEL: define dso_local noundef double @test___drcp_rn(9038// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9039// NCRDIV-NEXT: [[ENTRY:.*:]]9040// NCRDIV-NEXT: [[DIV_I:%.*]] = fdiv contract double 1.000000e+00, [[X]]9041// NCRDIV-NEXT: ret double [[DIV_I]]9042//9043// AMDGCNSPIRV-LABEL: define spir_func noundef double @test___drcp_rn(9044// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9045// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9046// AMDGCNSPIRV-NEXT: [[DIV_I:%.*]] = fdiv contract double 1.000000e+00, [[X]]9047// AMDGCNSPIRV-NEXT: ret double [[DIV_I]]9048//9049extern "C" __device__ double test___drcp_rn(double x) {9050 return __drcp_rn(x);9051}9052 9053// DEFAULT-LABEL: define dso_local noundef double @test___dsqrt_rn(9054// DEFAULT-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9055// DEFAULT-NEXT: [[ENTRY:.*:]]9056// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.sqrt.f64(double [[X]])9057// DEFAULT-NEXT: ret double [[TMP0]]9058//9059// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test___dsqrt_rn(9060// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9061// FINITEONLY-NEXT: [[ENTRY:.*:]]9062// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.sqrt.f64(double nofpclass(nan inf) [[X]])9063// FINITEONLY-NEXT: ret double [[TMP0]]9064//9065// APPROX-LABEL: define dso_local noundef double @test___dsqrt_rn(9066// APPROX-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9067// APPROX-NEXT: [[ENTRY:.*:]]9068// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.sqrt.f64(double [[X]])9069// APPROX-NEXT: ret double [[TMP0]]9070//9071// NCRDIV-LABEL: define dso_local noundef double @test___dsqrt_rn(9072// NCRDIV-SAME: double noundef [[X:%.*]]) local_unnamed_addr #[[ATTR3]] {9073// NCRDIV-NEXT: [[ENTRY:.*:]]9074// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.sqrt.f64(double [[X]])9075// NCRDIV-NEXT: ret double [[TMP0]]9076//9077// AMDGCNSPIRV-LABEL: define spir_func noundef double @test___dsqrt_rn(9078// AMDGCNSPIRV-SAME: double noundef [[X:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9079// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9080// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.sqrt.f64(double [[X]])9081// AMDGCNSPIRV-NEXT: ret double [[TMP0]]9082//9083extern "C" __device__ double test___dsqrt_rn(double x) {9084 return __dsqrt_rn(x);9085}9086 9087// DEFAULT-LABEL: define dso_local noundef double @test__fma_rn(9088// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {9089// DEFAULT-NEXT: [[ENTRY:.*:]]9090// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])9091// DEFAULT-NEXT: ret double [[TMP0]]9092//9093// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test__fma_rn(9094// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]], double noundef nofpclass(nan inf) [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {9095// FINITEONLY-NEXT: [[ENTRY:.*:]]9096// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.fma.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]], double nofpclass(nan inf) [[Z]])9097// FINITEONLY-NEXT: ret double [[TMP0]]9098//9099// APPROX-LABEL: define dso_local noundef double @test__fma_rn(9100// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {9101// APPROX-NEXT: [[ENTRY:.*:]]9102// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])9103// APPROX-NEXT: ret double [[TMP0]]9104//9105// NCRDIV-LABEL: define dso_local noundef double @test__fma_rn(9106// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr #[[ATTR3]] {9107// NCRDIV-NEXT: [[ENTRY:.*:]]9108// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])9109// NCRDIV-NEXT: ret double [[TMP0]]9110//9111// AMDGCNSPIRV-LABEL: define spir_func noundef double @test__fma_rn(9112// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]], double noundef [[Z:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9113// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9114// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.fma.f64(double [[X]], double [[Y]], double [[Z]])9115// AMDGCNSPIRV-NEXT: ret double [[TMP0]]9116//9117extern "C" __device__ double test__fma_rn(double x, double y, double z) {9118 return __fma_rn(x, y, z);9119}9120 9121// DEFAULT-LABEL: define dso_local noundef float @test_float_min(9122// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9123// DEFAULT-NEXT: [[ENTRY:.*:]]9124// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.minnum.f32(float [[X]], float [[Y]])9125// DEFAULT-NEXT: ret float [[TMP0]]9126//9127// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_float_min(9128// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9129// FINITEONLY-NEXT: [[ENTRY:.*:]]9130// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.minnum.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]])9131// FINITEONLY-NEXT: ret float [[TMP0]]9132//9133// APPROX-LABEL: define dso_local noundef float @test_float_min(9134// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9135// APPROX-NEXT: [[ENTRY:.*:]]9136// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.minnum.f32(float [[X]], float [[Y]])9137// APPROX-NEXT: ret float [[TMP0]]9138//9139// NCRDIV-LABEL: define dso_local noundef float @test_float_min(9140// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9141// NCRDIV-NEXT: [[ENTRY:.*:]]9142// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.minnum.f32(float [[X]], float [[Y]])9143// NCRDIV-NEXT: ret float [[TMP0]]9144//9145// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_float_min(9146// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9147// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9148// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.minnum.f32(float [[X]], float [[Y]])9149// AMDGCNSPIRV-NEXT: ret float [[TMP0]]9150//9151extern "C" __device__ float test_float_min(float x, float y) {9152 return min(x, y);9153}9154 9155// DEFAULT-LABEL: define dso_local noundef float @test_float_max(9156// DEFAULT-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9157// DEFAULT-NEXT: [[ENTRY:.*:]]9158// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.maxnum.f32(float [[X]], float [[Y]])9159// DEFAULT-NEXT: ret float [[TMP0]]9160//9161// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) float @test_float_max(9162// FINITEONLY-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9163// FINITEONLY-NEXT: [[ENTRY:.*:]]9164// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef float @llvm.maxnum.f32(float nofpclass(nan inf) [[X]], float nofpclass(nan inf) [[Y]])9165// FINITEONLY-NEXT: ret float [[TMP0]]9166//9167// APPROX-LABEL: define dso_local noundef float @test_float_max(9168// APPROX-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9169// APPROX-NEXT: [[ENTRY:.*:]]9170// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.maxnum.f32(float [[X]], float [[Y]])9171// APPROX-NEXT: ret float [[TMP0]]9172//9173// NCRDIV-LABEL: define dso_local noundef float @test_float_max(9174// NCRDIV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9175// NCRDIV-NEXT: [[ENTRY:.*:]]9176// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef float @llvm.maxnum.f32(float [[X]], float [[Y]])9177// NCRDIV-NEXT: ret float [[TMP0]]9178//9179// AMDGCNSPIRV-LABEL: define spir_func noundef float @test_float_max(9180// AMDGCNSPIRV-SAME: float noundef [[X:%.*]], float noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9181// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9182// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) float @llvm.maxnum.f32(float [[X]], float [[Y]])9183// AMDGCNSPIRV-NEXT: ret float [[TMP0]]9184//9185extern "C" __device__ float test_float_max(float x, float y) {9186 return max(x, y);9187}9188 9189// DEFAULT-LABEL: define dso_local noundef double @test_double_min(9190// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9191// DEFAULT-NEXT: [[ENTRY:.*:]]9192// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.minnum.f64(double [[X]], double [[Y]])9193// DEFAULT-NEXT: ret double [[TMP0]]9194//9195// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_double_min(9196// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9197// FINITEONLY-NEXT: [[ENTRY:.*:]]9198// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.minnum.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]])9199// FINITEONLY-NEXT: ret double [[TMP0]]9200//9201// APPROX-LABEL: define dso_local noundef double @test_double_min(9202// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9203// APPROX-NEXT: [[ENTRY:.*:]]9204// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.minnum.f64(double [[X]], double [[Y]])9205// APPROX-NEXT: ret double [[TMP0]]9206//9207// NCRDIV-LABEL: define dso_local noundef double @test_double_min(9208// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9209// NCRDIV-NEXT: [[ENTRY:.*:]]9210// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.minnum.f64(double [[X]], double [[Y]])9211// NCRDIV-NEXT: ret double [[TMP0]]9212//9213// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_double_min(9214// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9215// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9216// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.minnum.f64(double [[X]], double [[Y]])9217// AMDGCNSPIRV-NEXT: ret double [[TMP0]]9218//9219extern "C" __device__ double test_double_min(double x, double y) {9220 return min(x, y);9221}9222 9223// DEFAULT-LABEL: define dso_local noundef double @test_double_max(9224// DEFAULT-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9225// DEFAULT-NEXT: [[ENTRY:.*:]]9226// DEFAULT-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.maxnum.f64(double [[X]], double [[Y]])9227// DEFAULT-NEXT: ret double [[TMP0]]9228//9229// FINITEONLY-LABEL: define dso_local noundef nofpclass(nan inf) double @test_double_max(9230// FINITEONLY-SAME: double noundef nofpclass(nan inf) [[X:%.*]], double noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9231// FINITEONLY-NEXT: [[ENTRY:.*:]]9232// FINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf contract noundef double @llvm.maxnum.f64(double nofpclass(nan inf) [[X]], double nofpclass(nan inf) [[Y]])9233// FINITEONLY-NEXT: ret double [[TMP0]]9234//9235// APPROX-LABEL: define dso_local noundef double @test_double_max(9236// APPROX-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9237// APPROX-NEXT: [[ENTRY:.*:]]9238// APPROX-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.maxnum.f64(double [[X]], double [[Y]])9239// APPROX-NEXT: ret double [[TMP0]]9240//9241// NCRDIV-LABEL: define dso_local noundef double @test_double_max(9242// NCRDIV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9243// NCRDIV-NEXT: [[ENTRY:.*:]]9244// NCRDIV-NEXT: [[TMP0:%.*]] = tail call contract noundef double @llvm.maxnum.f64(double [[X]], double [[Y]])9245// NCRDIV-NEXT: ret double [[TMP0]]9246//9247// AMDGCNSPIRV-LABEL: define spir_func noundef double @test_double_max(9248// AMDGCNSPIRV-SAME: double noundef [[X:%.*]], double noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9249// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9250// AMDGCNSPIRV-NEXT: [[TMP0:%.*]] = tail call contract noundef addrspace(4) double @llvm.maxnum.f64(double [[X]], double [[Y]])9251// AMDGCNSPIRV-NEXT: ret double [[TMP0]]9252//9253extern "C" __device__ double test_double_max(double x, double y) {9254 return max(x, y);9255}9256// CHECK-LABEL: define dso_local noundef i32 @test_int_min(9257// CHECK-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9258// CHECK-NEXT: [[ENTRY:.*:]]9259// CHECK-NEXT: [[COND_I:%.*]] = tail call noundef i32 @llvm.smin.i32(i32 [[X]], i32 [[Y]])9260// CHECK-NEXT: ret i32 [[COND_I]]9261//9262// AMDGCNSPIRV-LABEL: define spir_func noundef i32 @test_int_min(9263// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9264// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9265// AMDGCNSPIRV-NEXT: [[COND_I:%.*]] = tail call noundef addrspace(4) i32 @llvm.smin.i32(i32 [[X]], i32 [[Y]])9266// AMDGCNSPIRV-NEXT: ret i32 [[COND_I]]9267//9268extern "C" __device__ int test_int_min(int x, int y) {9269 return min(x, y);9270}9271 9272// CHECK-LABEL: define dso_local noundef i32 @test_int_max(9273// CHECK-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] {9274// CHECK-NEXT: [[ENTRY:.*:]]9275// CHECK-NEXT: [[COND_I:%.*]] = tail call noundef i32 @llvm.smax.i32(i32 [[X]], i32 [[Y]])9276// CHECK-NEXT: ret i32 [[COND_I]]9277//9278// AMDGCNSPIRV-LABEL: define spir_func noundef i32 @test_int_max(9279// AMDGCNSPIRV-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr addrspace(4) #[[ATTR3]] {9280// AMDGCNSPIRV-NEXT: [[ENTRY:.*:]]9281// AMDGCNSPIRV-NEXT: [[COND_I:%.*]] = tail call noundef addrspace(4) i32 @llvm.smax.i32(i32 [[X]], i32 [[Y]])9282// AMDGCNSPIRV-NEXT: ret i32 [[COND_I]]9283//9284extern "C" __device__ int test_int_max(int x, int y) {9285 return max(x, y);9286}9287//.9288// DEFAULT: [[INT_TBAA4]] = !{[[META5:![0-9]+]], [[META5]], i64 0}9289// DEFAULT: [[META5]] = !{!"int", [[META6:![0-9]+]], i64 0}9290// DEFAULT: [[META6]] = !{!"omnipotent char", [[META7:![0-9]+]], i64 0}9291// DEFAULT: [[META7]] = !{!"Simple C++ TBAA"}9292// DEFAULT: [[CHAR_TBAA8]] = !{[[META6]], [[META6]], i64 0}9293// DEFAULT: [[LOOP9]] = distinct !{[[LOOP9]], [[META10:![0-9]+]], [[META11:![0-9]+]]}9294// DEFAULT: [[META10]] = !{!"llvm.loop.mustprogress"}9295// DEFAULT: [[META11]] = !{!"llvm.loop.unroll.disable"}9296// DEFAULT: [[LOOP12]] = distinct !{[[LOOP12]], [[META10]], [[META11]]}9297// DEFAULT: [[LOOP13]] = distinct !{[[LOOP13]], [[META10]], [[META11]]}9298// DEFAULT: [[LOOP14]] = distinct !{[[LOOP14]], [[META10]], [[META11]]}9299// DEFAULT: [[LOOP15]] = distinct !{[[LOOP15]], [[META10]], [[META11]]}9300// DEFAULT: [[FLOAT_TBAA16]] = !{[[META17:![0-9]+]], [[META17]], i64 0}9301// DEFAULT: [[META17]] = !{!"float", [[META6]], i64 0}9302// DEFAULT: [[DOUBLE_TBAA18]] = !{[[META19:![0-9]+]], [[META19]], i64 0}9303// DEFAULT: [[META19]] = !{!"double", [[META6]], i64 0}9304// DEFAULT: [[LOOP20]] = distinct !{[[LOOP20]], [[META10]], [[META11]]}9305// DEFAULT: [[LOOP21]] = distinct !{[[LOOP21]], [[META10]], [[META11]]}9306// DEFAULT: [[LOOP22]] = distinct !{[[LOOP22]], [[META10]], [[META11]]}9307// DEFAULT: [[LOOP23]] = distinct !{[[LOOP23]], [[META10]], [[META11]]}9308// DEFAULT: [[LOOP24]] = distinct !{[[LOOP24]], [[META10]], [[META11]]}9309// DEFAULT: [[LOOP25]] = distinct !{[[LOOP25]], [[META10]], [[META11]]}9310//.9311// FINITEONLY: [[INT_TBAA4]] = !{[[META5:![0-9]+]], [[META5]], i64 0}9312// FINITEONLY: [[META5]] = !{!"int", [[META6:![0-9]+]], i64 0}9313// FINITEONLY: [[META6]] = !{!"omnipotent char", [[META7:![0-9]+]], i64 0}9314// FINITEONLY: [[META7]] = !{!"Simple C++ TBAA"}9315// FINITEONLY: [[CHAR_TBAA8]] = !{[[META6]], [[META6]], i64 0}9316// FINITEONLY: [[LOOP9]] = distinct !{[[LOOP9]], [[META10:![0-9]+]], [[META11:![0-9]+]]}9317// FINITEONLY: [[META10]] = !{!"llvm.loop.mustprogress"}9318// FINITEONLY: [[META11]] = !{!"llvm.loop.unroll.disable"}9319// FINITEONLY: [[LOOP12]] = distinct !{[[LOOP12]], [[META10]], [[META11]]}9320// FINITEONLY: [[LOOP13]] = distinct !{[[LOOP13]], [[META10]], [[META11]]}9321// FINITEONLY: [[LOOP14]] = distinct !{[[LOOP14]], [[META10]], [[META11]]}9322// FINITEONLY: [[LOOP15]] = distinct !{[[LOOP15]], [[META10]], [[META11]]}9323// FINITEONLY: [[FLOAT_TBAA16]] = !{[[META17:![0-9]+]], [[META17]], i64 0}9324// FINITEONLY: [[META17]] = !{!"float", [[META6]], i64 0}9325// FINITEONLY: [[DOUBLE_TBAA18]] = !{[[META19:![0-9]+]], [[META19]], i64 0}9326// FINITEONLY: [[META19]] = !{!"double", [[META6]], i64 0}9327// FINITEONLY: [[LOOP20]] = distinct !{[[LOOP20]], [[META10]], [[META11]]}9328// FINITEONLY: [[LOOP21]] = distinct !{[[LOOP21]], [[META10]], [[META11]]}9329// FINITEONLY: [[LOOP22]] = distinct !{[[LOOP22]], [[META10]], [[META11]]}9330// FINITEONLY: [[LOOP23]] = distinct !{[[LOOP23]], [[META10]], [[META11]]}9331// FINITEONLY: [[LOOP24]] = distinct !{[[LOOP24]], [[META10]], [[META11]]}9332// FINITEONLY: [[LOOP25]] = distinct !{[[LOOP25]], [[META10]], [[META11]]}9333//.9334// APPROX: [[INT_TBAA4]] = !{[[META5:![0-9]+]], [[META5]], i64 0}9335// APPROX: [[META5]] = !{!"int", [[META6:![0-9]+]], i64 0}9336// APPROX: [[META6]] = !{!"omnipotent char", [[META7:![0-9]+]], i64 0}9337// APPROX: [[META7]] = !{!"Simple C++ TBAA"}9338// APPROX: [[CHAR_TBAA8]] = !{[[META6]], [[META6]], i64 0}9339// APPROX: [[LOOP9]] = distinct !{[[LOOP9]], [[META10:![0-9]+]], [[META11:![0-9]+]]}9340// APPROX: [[META10]] = !{!"llvm.loop.mustprogress"}9341// APPROX: [[META11]] = !{!"llvm.loop.unroll.disable"}9342// APPROX: [[LOOP12]] = distinct !{[[LOOP12]], [[META10]], [[META11]]}9343// APPROX: [[LOOP13]] = distinct !{[[LOOP13]], [[META10]], [[META11]]}9344// APPROX: [[LOOP14]] = distinct !{[[LOOP14]], [[META10]], [[META11]]}9345// APPROX: [[LOOP15]] = distinct !{[[LOOP15]], [[META10]], [[META11]]}9346// APPROX: [[FLOAT_TBAA16]] = !{[[META17:![0-9]+]], [[META17]], i64 0}9347// APPROX: [[META17]] = !{!"float", [[META6]], i64 0}9348// APPROX: [[DOUBLE_TBAA18]] = !{[[META19:![0-9]+]], [[META19]], i64 0}9349// APPROX: [[META19]] = !{!"double", [[META6]], i64 0}9350// APPROX: [[LOOP20]] = distinct !{[[LOOP20]], [[META10]], [[META11]]}9351// APPROX: [[LOOP21]] = distinct !{[[LOOP21]], [[META10]], [[META11]]}9352// APPROX: [[LOOP22]] = distinct !{[[LOOP22]], [[META10]], [[META11]]}9353// APPROX: [[LOOP23]] = distinct !{[[LOOP23]], [[META10]], [[META11]]}9354// APPROX: [[LOOP24]] = distinct !{[[LOOP24]], [[META10]], [[META11]]}9355// APPROX: [[LOOP25]] = distinct !{[[LOOP25]], [[META10]], [[META11]]}9356//.9357// NCRDIV: [[INT_TBAA4]] = !{[[META5:![0-9]+]], [[META5]], i64 0}9358// NCRDIV: [[META5]] = !{!"int", [[META6:![0-9]+]], i64 0}9359// NCRDIV: [[META6]] = !{!"omnipotent char", [[META7:![0-9]+]], i64 0}9360// NCRDIV: [[META7]] = !{!"Simple C++ TBAA"}9361// NCRDIV: [[CHAR_TBAA8]] = !{[[META6]], [[META6]], i64 0}9362// NCRDIV: [[LOOP9]] = distinct !{[[LOOP9]], [[META10:![0-9]+]], [[META11:![0-9]+]]}9363// NCRDIV: [[META10]] = !{!"llvm.loop.mustprogress"}9364// NCRDIV: [[META11]] = !{!"llvm.loop.unroll.disable"}9365// NCRDIV: [[LOOP12]] = distinct !{[[LOOP12]], [[META10]], [[META11]]}9366// NCRDIV: [[LOOP13]] = distinct !{[[LOOP13]], [[META10]], [[META11]]}9367// NCRDIV: [[META14]] = !{float 2.500000e+00}9368// NCRDIV: [[LOOP15]] = distinct !{[[LOOP15]], [[META10]], [[META11]]}9369// NCRDIV: [[LOOP16]] = distinct !{[[LOOP16]], [[META10]], [[META11]]}9370// NCRDIV: [[FLOAT_TBAA17]] = !{[[META18:![0-9]+]], [[META18]], i64 0}9371// NCRDIV: [[META18]] = !{!"float", [[META6]], i64 0}9372// NCRDIV: [[DOUBLE_TBAA19]] = !{[[META20:![0-9]+]], [[META20]], i64 0}9373// NCRDIV: [[META20]] = !{!"double", [[META6]], i64 0}9374// NCRDIV: [[LOOP21]] = distinct !{[[LOOP21]], [[META10]], [[META11]]}9375// NCRDIV: [[LOOP22]] = distinct !{[[LOOP22]], [[META10]], [[META11]]}9376// NCRDIV: [[LOOP23]] = distinct !{[[LOOP23]], [[META10]], [[META11]]}9377// NCRDIV: [[LOOP24]] = distinct !{[[LOOP24]], [[META10]], [[META11]]}9378// NCRDIV: [[META25]] = !{float 3.000000e+00}9379// NCRDIV: [[LOOP26]] = distinct !{[[LOOP26]], [[META10]], [[META11]]}9380// NCRDIV: [[LOOP27]] = distinct !{[[LOOP27]], [[META10]], [[META11]]}9381//.9382// AMDGCNSPIRV: [[INT_TBAA5]] = !{[[META6:![0-9]+]], [[META6]], i64 0}9383// AMDGCNSPIRV: [[META6]] = !{!"int", [[META7:![0-9]+]], i64 0}9384// AMDGCNSPIRV: [[META7]] = !{!"omnipotent char", [[META8:![0-9]+]], i64 0}9385// AMDGCNSPIRV: [[META8]] = !{!"Simple C++ TBAA"}9386// AMDGCNSPIRV: [[CHAR_TBAA9]] = !{[[META7]], [[META7]], i64 0}9387// AMDGCNSPIRV: [[LOOP10]] = distinct !{[[LOOP10]], [[META11:![0-9]+]], [[META12:![0-9]+]]}9388// AMDGCNSPIRV: [[META11]] = !{!"llvm.loop.mustprogress"}9389// AMDGCNSPIRV: [[META12]] = !{!"llvm.loop.unroll.disable"}9390// AMDGCNSPIRV: [[LOOP13]] = distinct !{[[LOOP13]], [[META11]], [[META12]]}9391// AMDGCNSPIRV: [[LOOP14]] = distinct !{[[LOOP14]], [[META11]], [[META12]]}9392// AMDGCNSPIRV: [[LOOP15]] = distinct !{[[LOOP15]], [[META11]], [[META12]]}9393// AMDGCNSPIRV: [[LOOP16]] = distinct !{[[LOOP16]], [[META11]], [[META12]]}9394// AMDGCNSPIRV: [[FLOAT_TBAA17]] = !{[[META18:![0-9]+]], [[META18]], i64 0}9395// AMDGCNSPIRV: [[META18]] = !{!"float", [[META7]], i64 0}9396// AMDGCNSPIRV: [[DOUBLE_TBAA19]] = !{[[META20:![0-9]+]], [[META20]], i64 0}9397// AMDGCNSPIRV: [[META20]] = !{!"double", [[META7]], i64 0}9398// AMDGCNSPIRV: [[LOOP21]] = distinct !{[[LOOP21]], [[META11]], [[META12]]}9399// AMDGCNSPIRV: [[LOOP22]] = distinct !{[[LOOP22]], [[META11]], [[META12]]}9400// AMDGCNSPIRV: [[LOOP23]] = distinct !{[[LOOP23]], [[META11]], [[META12]]}9401// AMDGCNSPIRV: [[LOOP24]] = distinct !{[[LOOP24]], [[META11]], [[META12]]}9402// AMDGCNSPIRV: [[LOOP25]] = distinct !{[[LOOP25]], [[META11]], [[META12]]}9403// AMDGCNSPIRV: [[LOOP26]] = distinct !{[[LOOP26]], [[META11]], [[META12]]}9404//.9405