brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · f471f45 Raw
58 lines · plain
1; RUN: llc -mtriple=r600 -mcpu=redwood < %s | FileCheck %s2 3; CHECK-LABEL: {{^}}cube:4; CHECK: CUBE T{{[0-9]}}.X5; CHECK: CUBE T{{[0-9]}}.Y6; CHECK: CUBE T{{[0-9]}}.Z7; CHECK: CUBE * T{{[0-9]}}.W8define amdgpu_ps void @cube() {9main_body:10  %tmp = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 9)11  %tmp1 = extractelement <4 x float> %tmp, i32 312  %tmp2 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 9)13  %tmp3 = extractelement <4 x float> %tmp2, i32 014  %tmp4 = fdiv float %tmp3, %tmp115  %tmp5 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 9)16  %tmp6 = extractelement <4 x float> %tmp5, i32 117  %tmp7 = fdiv float %tmp6, %tmp118  %tmp8 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 9)19  %tmp9 = extractelement <4 x float> %tmp8, i32 220  %tmp10 = fdiv float %tmp9, %tmp121  %tmp11 = insertelement <4 x float> poison, float %tmp4, i32 022  %tmp12 = insertelement <4 x float> %tmp11, float %tmp7, i32 123  %tmp13 = insertelement <4 x float> %tmp12, float %tmp10, i32 224  %tmp14 = insertelement <4 x float> %tmp13, float 1.000000e+00, i32 325  %tmp15 = call <4 x float> @llvm.r600.cube(<4 x float> %tmp14)26  %tmp16 = extractelement <4 x float> %tmp15, i32 027  %tmp17 = extractelement <4 x float> %tmp15, i32 128  %tmp18 = extractelement <4 x float> %tmp15, i32 229  %tmp19 = extractelement <4 x float> %tmp15, i32 330  %tmp20 = call float @llvm.fabs.f32(float %tmp18)31  %tmp21 = fdiv float 1.000000e+00, %tmp2032  %tmp22 = fmul float %tmp16, %tmp2133  %tmp23 = fadd float %tmp22, 1.500000e+0034  %tmp24 = fmul float %tmp17, %tmp2135  %tmp25 = fadd float %tmp24, 1.500000e+0036  %tmp26 = insertelement <4 x float> poison, float %tmp25, i32 037  %tmp27 = insertelement <4 x float> %tmp26, float %tmp23, i32 138  %tmp28 = insertelement <4 x float> %tmp27, float %tmp19, i32 239  %tmp29 = insertelement <4 x float> %tmp28, float %tmp25, i32 340  %tmp30 = shufflevector <4 x float> %tmp29, <4 x float> %tmp29, <4 x i32> <i32 0, i32 1, i32 2, i32 3>41  %tmp31 = call <4 x float> @llvm.r600.tex(<4 x float> %tmp30, i32 0, i32 0, i32 0, i32 16, i32 0, i32 1, i32 1, i32 1, i32 1)42  call void @llvm.r600.store.swizzle(<4 x float> %tmp31, i32 0, i32 0)43  ret void44}45 46; Function Attrs: readnone47declare <4 x float> @llvm.r600.cube(<4 x float>) #048 49; Function Attrs: nounwind readnone50declare float @llvm.fabs.f32(float) #051 52declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32)53 54; Function Attrs: readnone55declare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #056 57attributes #0 = { nounwind readnone }58