1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2 2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT 3 4declare float @llvm.sin.f32(float) 5declare float @llvm.cos.f32(float) 6 7define float @ret_sin(float %arg) { 8; CHECK-LABEL: define nofpclass(inf) float @ret_sin 9; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR1:[0-9]+]] { 10; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.sin.f32(float [[ARG]]) #[[ATTR2:[0-9]+]] 11; CHECK-NEXT: ret float [[CALL]] 12; 13 %call = call float @llvm.sin.f32(float %arg) 14 ret float %call 15} 16 17define float @ret_cos(float %arg) { 18; CHECK-LABEL: define nofpclass(inf) float @ret_cos 19; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR1]] { 20; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.cos.f32(float [[ARG]]) #[[ATTR2]] 21; CHECK-NEXT: ret float [[CALL]] 22; 23 %call = call float @llvm.cos.f32(float %arg) 24 ret float %call 25} 26 27define float @ret_sin_noinf(float nofpclass(inf) %arg) { 28; CHECK-LABEL: define nofpclass(inf) float @ret_sin_noinf 29; CHECK-SAME: (float nofpclass(inf) [[ARG:%.*]]) #[[ATTR1]] { 30; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.sin.f32(float nofpclass(inf) [[ARG]]) #[[ATTR2]] 31; CHECK-NEXT: ret float [[CALL]] 32; 33 %call = call float @llvm.sin.f32(float %arg) 34 ret float %call 35} 36 37define float @ret_cos_noinf(float nofpclass(inf) %arg) { 38; CHECK-LABEL: define nofpclass(inf) float @ret_cos_noinf 39; CHECK-SAME: (float nofpclass(inf) [[ARG:%.*]]) #[[ATTR1]] { 40; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.cos.f32(float nofpclass(inf) [[ARG]]) #[[ATTR2]] 41; CHECK-NEXT: ret float [[CALL]] 42; 43 %call = call float @llvm.cos.f32(float %arg) 44 ret float %call 45} 46 47define float @ret_sin_nonan(float nofpclass(nan) %arg) { 48; CHECK-LABEL: define nofpclass(inf) float @ret_sin_nonan 49; CHECK-SAME: (float nofpclass(nan) [[ARG:%.*]]) #[[ATTR1]] { 50; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.sin.f32(float nofpclass(nan) [[ARG]]) #[[ATTR2]] 51; CHECK-NEXT: ret float [[CALL]] 52; 53 %call = call float @llvm.sin.f32(float %arg) 54 ret float %call 55} 56 57define float @ret_cos_nonan(float nofpclass(nan) %arg) { 58; CHECK-LABEL: define nofpclass(inf) float @ret_cos_nonan 59; CHECK-SAME: (float nofpclass(nan) [[ARG:%.*]]) #[[ATTR1]] { 60; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.cos.f32(float nofpclass(nan) [[ARG]]) #[[ATTR2]] 61; CHECK-NEXT: ret float [[CALL]] 62; 63 %call = call float @llvm.cos.f32(float %arg) 64 ret float %call 65} 66 67define float @ret_sin_nonan_noinf(float nofpclass(nan inf) %arg) { 68; CHECK-LABEL: define nofpclass(nan inf) float @ret_sin_nonan_noinf 69; CHECK-SAME: (float nofpclass(nan inf) [[ARG:%.*]]) #[[ATTR1]] { 70; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan inf) float @llvm.sin.f32(float nofpclass(nan inf) [[ARG]]) #[[ATTR2]] 71; CHECK-NEXT: ret float [[CALL]] 72; 73 %call = call float @llvm.sin.f32(float %arg) 74 ret float %call 75} 76 77define float @ret_cos_nonan_noinf(float nofpclass(nan inf) %arg) { 78; CHECK-LABEL: define nofpclass(nan inf) float @ret_cos_nonan_noinf 79; CHECK-SAME: (float nofpclass(nan inf) [[ARG:%.*]]) #[[ATTR1]] { 80; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan inf) float @llvm.cos.f32(float nofpclass(nan inf) [[ARG]]) #[[ATTR2]] 81; CHECK-NEXT: ret float [[CALL]] 82; 83 %call = call float @llvm.cos.f32(float %arg) 84 ret float %call 85} 86 87 88define float @ret_sin_noqnan(float nofpclass(qnan) %arg) { 89; CHECK-LABEL: define nofpclass(inf) float @ret_sin_noqnan 90; CHECK-SAME: (float nofpclass(qnan) [[ARG:%.*]]) #[[ATTR1]] { 91; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.sin.f32(float nofpclass(qnan) [[ARG]]) #[[ATTR2]] 92; CHECK-NEXT: ret float [[CALL]] 93; 94 %call = call float @llvm.sin.f32(float %arg) 95 ret float %call 96} 97 98define float @ret_cos_noqnan(float nofpclass(qnan) %arg) { 99; CHECK-LABEL: define nofpclass(inf) float @ret_cos_noqnan 100; CHECK-SAME: (float nofpclass(qnan) [[ARG:%.*]]) #[[ATTR1]] { 101; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.cos.f32(float nofpclass(qnan) [[ARG]]) #[[ATTR2]] 102; CHECK-NEXT: ret float [[CALL]] 103; 104 %call = call float @llvm.cos.f32(float %arg) 105 ret float %call 106} 107 108;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: 109; TUNIT: {{.*}} 110