brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.7 KiB · f00b8db Raw
113 lines · plain
1; RUN: llc -mtriple=r600 -mcpu=redwood < %s | FileCheck %s2 3; CHECK: {{^}}main1:4; CHECK: MOV * T{{[0-9]+\.[XYZW], KC0}}5define amdgpu_kernel void @main1() #0 {6main_body:7  %tmp = load <4 x float>, ptr addrspace(8) null8  %tmp7 = extractelement <4 x float> %tmp, i32 09  %tmp8 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)10  %tmp9 = extractelement <4 x float> %tmp8, i32 011  %tmp10 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)12  %tmp11 = extractelement <4 x float> %tmp10, i32 013  %tmp12 = fcmp ogt float %tmp7, 0.000000e+0014  %tmp13 = select i1 %tmp12, float %tmp9, float %tmp1115  %tmp14 = load <4 x float>, ptr addrspace(8) null16  %tmp15 = extractelement <4 x float> %tmp14, i32 117  %tmp16 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)18  %tmp17 = extractelement <4 x float> %tmp16, i32 119  %tmp18 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)20  %tmp19 = extractelement <4 x float> %tmp18, i32 121  %tmp20 = fcmp ogt float %tmp15, 0.000000e+0022  %tmp21 = select i1 %tmp20, float %tmp17, float %tmp1923  %tmp22 = load <4 x float>, ptr addrspace(8) null24  %tmp23 = extractelement <4 x float> %tmp22, i32 225  %tmp24 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)26  %tmp25 = extractelement <4 x float> %tmp24, i32 227  %tmp26 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)28  %tmp27 = extractelement <4 x float> %tmp26, i32 229  %tmp28 = fcmp ogt float %tmp23, 0.000000e+0030  %tmp29 = select i1 %tmp28, float %tmp25, float %tmp2731  %tmp30 = load <4 x float>, ptr addrspace(8) null32  %tmp31 = extractelement <4 x float> %tmp30, i32 333  %tmp32 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)34  %tmp33 = extractelement <4 x float> %tmp32, i32 335  %tmp34 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)36  %tmp35 = extractelement <4 x float> %tmp34, i32 337  %tmp36 = fcmp ogt float %tmp31, 0.000000e+0038  %tmp37 = select i1 %tmp36, float %tmp33, float %tmp3539  %max.0.i = call float @llvm.maxnum.f32(float %tmp13, float 0.000000e+00)40  %clamp.i = call float @llvm.minnum.f32(float %max.0.i, float 1.000000e+00)41  %max.0.i5 = call float @llvm.maxnum.f32(float %tmp21, float 0.000000e+00)42  %clamp.i6 = call float @llvm.minnum.f32(float %max.0.i5, float 1.000000e+00)43  %max.0.i3 = call float @llvm.maxnum.f32(float %tmp29, float 0.000000e+00)44  %clamp.i4 = call float @llvm.minnum.f32(float %max.0.i3, float 1.000000e+00)45  %max.0.i1 = call float @llvm.maxnum.f32(float %tmp37, float 0.000000e+00)46  %clamp.i2 = call float @llvm.minnum.f32(float %max.0.i1, float 1.000000e+00)47  %tmp38 = insertelement <4 x float> poison, float %clamp.i, i32 048  %tmp39 = insertelement <4 x float> %tmp38, float %clamp.i6, i32 149  %tmp40 = insertelement <4 x float> %tmp39, float %clamp.i4, i32 250  %tmp41 = insertelement <4 x float> %tmp40, float %clamp.i2, i32 351  call void @llvm.r600.store.swizzle(<4 x float> %tmp41, i32 0, i32 0)52  ret void53}54 55; CHECK: {{^}}main2:56; CHECK-NOT: MOV57define amdgpu_kernel void @main2() #0 {58main_body:59  %tmp = load <4 x float>, ptr addrspace(8) null60  %tmp7 = extractelement <4 x float> %tmp, i32 061  %tmp8 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)62  %tmp9 = extractelement <4 x float> %tmp8, i32 063  %tmp10 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)64  %tmp11 = extractelement <4 x float> %tmp10, i32 165  %tmp12 = fcmp ogt float %tmp7, 0.000000e+0066  %tmp13 = select i1 %tmp12, float %tmp9, float %tmp1167  %tmp14 = load <4 x float>, ptr addrspace(8) null68  %tmp15 = extractelement <4 x float> %tmp14, i32 169  %tmp16 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)70  %tmp17 = extractelement <4 x float> %tmp16, i32 071  %tmp18 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)72  %tmp19 = extractelement <4 x float> %tmp18, i32 173  %tmp20 = fcmp ogt float %tmp15, 0.000000e+0074  %tmp21 = select i1 %tmp20, float %tmp17, float %tmp1975  %tmp22 = load <4 x float>, ptr addrspace(8) null76  %tmp23 = extractelement <4 x float> %tmp22, i32 277  %tmp24 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)78  %tmp25 = extractelement <4 x float> %tmp24, i32 379  %tmp26 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 1)80  %tmp27 = extractelement <4 x float> %tmp26, i32 281  %tmp28 = fcmp ogt float %tmp23, 0.000000e+0082  %tmp29 = select i1 %tmp28, float %tmp25, float %tmp2783  %tmp30 = load <4 x float>, ptr addrspace(8) null84  %tmp31 = extractelement <4 x float> %tmp30, i32 385  %tmp32 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)86  %tmp33 = extractelement <4 x float> %tmp32, i32 387  %tmp34 = load <4 x float>, ptr addrspace(8) getelementptr ([1024 x <4 x float>], ptr addrspace(8) null, i64 0, i32 2)88  %tmp35 = extractelement <4 x float> %tmp34, i32 289  %tmp36 = fcmp ogt float %tmp31, 0.000000e+0090  %tmp37 = select i1 %tmp36, float %tmp33, float %tmp3591  %max.0.i = call float @llvm.maxnum.f32(float %tmp13, float 0.000000e+00)92  %clamp.i = call float @llvm.minnum.f32(float %max.0.i, float 1.000000e+00)93  %max.0.i5 = call float @llvm.maxnum.f32(float %tmp21, float 0.000000e+00)94  %clamp.i6 = call float @llvm.minnum.f32(float %max.0.i5, float 1.000000e+00)95  %max.0.i3 = call float @llvm.maxnum.f32(float %tmp29, float 0.000000e+00)96  %clamp.i4 = call float @llvm.minnum.f32(float %max.0.i3, float 1.000000e+00)97  %max.0.i1 = call float @llvm.maxnum.f32(float %tmp37, float 0.000000e+00)98  %clamp.i2 = call float @llvm.minnum.f32(float %max.0.i1, float 1.000000e+00)99  %tmp38 = insertelement <4 x float> poison, float %clamp.i, i32 0100  %tmp39 = insertelement <4 x float> %tmp38, float %clamp.i6, i32 1101  %tmp40 = insertelement <4 x float> %tmp39, float %clamp.i4, i32 2102  %tmp41 = insertelement <4 x float> %tmp40, float %clamp.i2, i32 3103  call void @llvm.r600.store.swizzle(<4 x float> %tmp41, i32 0, i32 0)104  ret void105}106 107declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) #0108declare float @llvm.minnum.f32(float, float) #1109declare float @llvm.maxnum.f32(float, float) #1110 111attributes #0 = { nounwind }112attributes #1 = { nounwind readnone }113