1 ; RUN: opt -mtriple=amdgcn--amdpal -S -instcombine <%s | FileCheck --check-prefixes=GCN %s
3 ; Check that sin/cos is not folded to tan on amdgcn.
5 ; GCN-LABEL: define amdgpu_ps float @llpc.shader.FS.main
6 ; GCN: call float @llvm.sin.f32
7 ; GCN: call float @llvm.cos.f32
9 declare float @llvm.sin.f32(float) #0
10 declare float @llvm.cos.f32(float) #0
12 define amdgpu_ps float @llpc.shader.FS.main(float %arg) {
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, %tmp33
17 %tmp35 = fmul reassoc nnan nsz arcp contract float %tmp32, %tmp34
21 attributes #0 = { nounwind readnone speculatable willreturn }