| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | |
| ; RUN: llc -global-isel=0 -mtriple=amdgpu6.00 < %s | FileCheck -check-prefix=GCN %s | |
| ; RUN: llc -global-isel=1 -mtriple=amdgpu6.00 < %s | FileCheck -check-prefix=GCN %s | |
| ; RUN: llc -global-isel=0 -mtriple=amdgpu8.03 < %s | FileCheck -check-prefix=GCN %s | |
| ; RUN: llc -global-isel=1 -mtriple=amdgpu8.03 < %s | FileCheck -check-prefix=GCN %s | |
| declare float @llvm.amdgcn.cubeid(float, float, float) #0 | |
| define amdgpu_ps float @test_cubeid_vvv(float %a, float %b, float %c) #1 { | |
| ; GCN-LABEL: test_cubeid_vvv: | |
| ; GCN: ; %bb.0: | |
| ; GCN-NEXT: v_cubeid_f32 v0, v0, v1, v2 | |
| ; GCN-NEXT: ; return to shader part epilog | |
| %result = call float @llvm.amdgcn.cubeid(float %a, float %b, float %c) | |
| ret float %result | |
| } | |
| define amdgpu_ps float @test_cubeid_sss(float inreg %a, float inreg %b, float inreg %c) #1 { | |
| ; GCN-LABEL: test_cubeid_sss: | |
| ; GCN: ; %bb.0: | |
| ; GCN-NEXT: v_mov_b32_e32 v0, s1 | |
| ; GCN-NEXT: v_mov_b32_e32 v1, s2 | |
| ; GCN-NEXT: v_cubeid_f32 v0, s0, v0, v1 | |
| ; GCN-NEXT: ; return to shader part epilog | |
| %result = call float @llvm.amdgcn.cubeid(float %a, float %b, float %c) | |
| ret float %result | |
| } | |
| attributes #0 = { nounwind readnone } | |
| attributes #1 = { nounwind } |