brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · c33b334 Raw
62 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 52; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 %s  | FileCheck --check-prefixes=GCN,UNSAFE %s3; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-no-nans-fp-math %s | FileCheck --check-prefixes=GCN,NONANS %s4; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-no-infs-fp-math %s | FileCheck --check-prefixes=GCN,NOINFS %s5 6declare void @extern() #07 8define float @foo(float %x) #0 {9; GCN-LABEL: define float @foo(10; GCN-SAME: float [[X:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {11; GCN-NEXT:  [[ENTRY:.*:]]12; GCN-NEXT:    tail call void @extern()13; GCN-NEXT:    [[MUL:%.*]] = fmul float [[X]], 1.500000e+0114; GCN-NEXT:    ret float [[MUL]]15;16entry:17  call void @extern()18  %mul = fmul float %x, 1.500000e+0119  ret float %mul20}21 22define amdgpu_kernel void @caller(ptr addrspace(1) %p) #1 {23; GCN-LABEL: define amdgpu_kernel void @caller(24; GCN-SAME: ptr addrspace(1) captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {25; GCN-NEXT:  [[ENTRY:.*:]]26; GCN-NEXT:    [[LOAD:%.*]] = load float, ptr addrspace(1) [[P]], align 4, !amdgpu.noclobber [[META0:![0-9]+]]27; GCN-NEXT:    tail call void @extern()28; GCN-NEXT:    [[MUL_I:%.*]] = fmul float [[LOAD]], 1.500000e+0129; GCN-NEXT:    store float [[MUL_I]], ptr addrspace(1) [[P]], align 430; GCN-NEXT:    ret void31;32entry:33  %load = load float, ptr addrspace(1) %p, align 434  %call = call fast float @foo(float %load)35  store float %call, ptr addrspace(1) %p, align 436  ret void37}38 39attributes #0 = { nounwind "uniform-work-group-size"="false"}40attributes #1 = { nounwind "less-precise-fpmad"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" }41 42;.43; UNSAFE: attributes #[[ATTR0]] = { nounwind "uniform-work-group-size"="false" }44; UNSAFE: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "uniform-work-group-size"="false" }45;.46; NONANS: attributes #[[ATTR0]] = { nounwind "no-nans-fp-math"="true" "uniform-work-group-size"="false" }47; NONANS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="true" "uniform-work-group-size"="false" }48;.49; NOINFS: attributes #[[ATTR0]] = { nounwind "no-infs-fp-math"="true" "uniform-work-group-size"="false" }50; NOINFS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="true" "no-nans-fp-math"="false" "uniform-work-group-size"="false" }51;.52; UNSAFE: [[META0]] = !{}53;.54; NONANS: [[META0]] = !{}55;.56; NOINFS: [[META0]] = !{}57;.58;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:59; NOINFS: {{.*}}60; NONANS: {{.*}}61; UNSAFE: {{.*}}62