brintos

brintos / llvm-project-archived public Read only

0
0
Text · 740 B · 62160a6 Raw
22 lines · plain
1; RUN: opt -mtriple=amdgcn--amdpal -S -passes=instcombine <%s | FileCheck --check-prefixes=GCN %s2 3; Check that sin/cos is not folded to tan on amdgcn.4 5; GCN-LABEL: define amdgpu_ps float @llpc.shader.FS.main6; GCN: call float @llvm.sin.f327; GCN: call float @llvm.cos.f328 9declare float @llvm.sin.f32(float) #010declare float @llvm.cos.f32(float) #011 12define amdgpu_ps float @llpc.shader.FS.main(float %arg) {13.entry:14  %tmp32 = call float @llvm.sin.f32(float %arg)15  %tmp33 = call float @llvm.cos.f32(float %arg)16  %tmp34 = fdiv reassoc nnan nsz arcp contract float 1.000000e+00, %tmp3317  %tmp35 = fmul reassoc nnan nsz arcp contract float %tmp32, %tmp3418  ret float %tmp3519}20 21attributes #0 = { nounwind readnone speculatable willreturn }22