diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-02-21 23:46:04 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-02-21 23:46:04 +0000 |
commit | 9417505f7db57d5413b9974b5484291466ba42a3 (patch) | |
tree | 2ddf8fe0895b8985e23f615f76f4de4f72fb5165 /llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll | |
parent | 2fdf2a1a189ce2d0462eb1902a88f5210b963063 (diff) | |
download | bcm5719-llvm-9417505f7db57d5413b9974b5484291466ba42a3.tar.gz bcm5719-llvm-9417505f7db57d5413b9974b5484291466ba42a3.zip |
AMDGPU: Remove llvm.AMDGPU.clamp intrinsic
llvm-svn: 295789
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll | 137 |
1 files changed, 70 insertions, 67 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll b/llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll index f907e154f96..5cf2c6c7675 100644 --- a/llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll +++ b/llvm/test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll @@ -1,88 +1,91 @@ -;RUN: llc < %s -march=r600 -mcpu=cayman -stress-sched -verify-misched -verify-machineinstrs -;REQUIRES: asserts +; RUN: llc -march=r600 -mcpu=cayman -stress-sched -verify-misched -verify-machineinstrs < %s +; REQUIRES: asserts -define void @main() { +define void @main() #0 { main_body: - %0 = load <4 x float>, <4 x float> addrspace(9)* null - %1 = extractelement <4 x float> %0, i32 3 - %2 = fptosi float %1 to i32 - %3 = bitcast i32 %2 to float - %4 = bitcast float %3 to i32 - %5 = sdiv i32 %4, 4 - %6 = bitcast i32 %5 to float - %7 = bitcast float %6 to i32 - %8 = mul i32 %7, 4 - %9 = bitcast i32 %8 to float - %10 = bitcast float %9 to i32 - %11 = sub i32 0, %10 - %12 = bitcast i32 %11 to float - %13 = bitcast float %3 to i32 - %14 = bitcast float %12 to i32 - %15 = add i32 %13, %14 - %16 = bitcast i32 %15 to float - %17 = load <4 x float>, <4 x float> addrspace(9)* null - %18 = extractelement <4 x float> %17, i32 0 - %19 = load <4 x float>, <4 x float> addrspace(9)* null - %20 = extractelement <4 x float> %19, i32 1 - %21 = load <4 x float>, <4 x float> addrspace(9)* null - %22 = extractelement <4 x float> %21, i32 2 + %tmp = load <4 x float>, <4 x float> addrspace(9)* null + %tmp5 = extractelement <4 x float> %tmp, i32 3 + %tmp6 = fptosi float %tmp5 to i32 + %tmp7 = bitcast i32 %tmp6 to float + %tmp8 = bitcast float %tmp7 to i32 + %tmp9 = sdiv i32 %tmp8, 4 + %tmp10 = bitcast i32 %tmp9 to float + %tmp11 = bitcast float %tmp10 to i32 + %tmp12 = mul i32 %tmp11, 4 + %tmp13 = bitcast i32 %tmp12 to float + %tmp14 = bitcast float %tmp13 to i32 + %tmp15 = sub i32 0, %tmp14 + %tmp16 = bitcast i32 %tmp15 to float + %tmp17 = bitcast float %tmp7 to i32 + %tmp18 = bitcast float %tmp16 to i32 + %tmp19 = add i32 %tmp17, %tmp18 + %tmp20 = bitcast i32 %tmp19 to float + %tmp21 = load <4 x float>, <4 x float> addrspace(9)* null + %tmp22 = extractelement <4 x float> %tmp21, i32 0 + %tmp23 = load <4 x float>, <4 x float> addrspace(9)* null + %tmp24 = extractelement <4 x float> %tmp23, i32 1 + %tmp25 = load <4 x float>, <4 x float> addrspace(9)* null + %tmp26 = extractelement <4 x float> %tmp25, i32 2 br label %LOOP LOOP: ; preds = %IF31, %main_body - %temp12.0 = phi float [ 0.000000e+00, %main_body ], [ %47, %IF31 ] - %temp6.0 = phi float [ %22, %main_body ], [ %temp6.1, %IF31 ] - %temp5.0 = phi float [ %20, %main_body ], [ %temp5.1, %IF31 ] - %temp4.0 = phi float [ %18, %main_body ], [ %temp4.1, %IF31 ] - %23 = bitcast float %temp12.0 to i32 - %24 = bitcast float %6 to i32 - %25 = icmp sge i32 %23, %24 - %26 = sext i1 %25 to i32 - %27 = bitcast i32 %26 to float - %28 = bitcast float %27 to i32 - %29 = icmp ne i32 %28, 0 - br i1 %29, label %IF, label %LOOP29 + %temp12.0 = phi float [ 0.000000e+00, %main_body ], [ %tmp47, %IF31 ] + %temp6.0 = phi float [ %tmp26, %main_body ], [ %temp6.1, %IF31 ] + %temp5.0 = phi float [ %tmp24, %main_body ], [ %temp5.1, %IF31 ] + %temp4.0 = phi float [ %tmp22, %main_body ], [ %temp4.1, %IF31 ] + %tmp27 = bitcast float %temp12.0 to i32 + %tmp28 = bitcast float %tmp10 to i32 + %tmp29 = icmp sge i32 %tmp27, %tmp28 + %tmp30 = sext i1 %tmp29 to i32 + %tmp31 = bitcast i32 %tmp30 to float + %tmp32 = bitcast float %tmp31 to i32 + %tmp33 = icmp ne i32 %tmp32, 0 + br i1 %tmp33, label %IF, label %LOOP29 IF: ; preds = %LOOP - %30 = call float @llvm.AMDGPU.clamp.f32(float %temp4.0, float 0.000000e+00, float 1.000000e+00) - %31 = call float @llvm.AMDGPU.clamp.f32(float %temp5.0, float 0.000000e+00, float 1.000000e+00) - %32 = call float @llvm.AMDGPU.clamp.f32(float %temp6.0, float 0.000000e+00, float 1.000000e+00) - %33 = call float @llvm.AMDGPU.clamp.f32(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00) - %34 = insertelement <4 x float> undef, float %30, i32 0 - %35 = insertelement <4 x float> %34, float %31, i32 1 - %36 = insertelement <4 x float> %35, float %32, i32 2 - %37 = insertelement <4 x float> %36, float %33, i32 3 - call void @llvm.r600.store.swizzle(<4 x float> %37, i32 0, i32 0) + %max.0.i = call float @llvm.maxnum.f32(float %temp4.0, float 0.000000e+00) + %clamp.i = call float @llvm.minnum.f32(float %max.0.i, float 1.000000e+00) + %max.0.i3 = call float @llvm.maxnum.f32(float %temp5.0, float 0.000000e+00) + %clamp.i4 = call float @llvm.minnum.f32(float %max.0.i3, float 1.000000e+00) + %max.0.i1 = call float @llvm.maxnum.f32(float %temp6.0, float 0.000000e+00) + %clamp.i2 = call float @llvm.minnum.f32(float %max.0.i1, float 1.000000e+00) + %tmp34 = insertelement <4 x float> undef, float %clamp.i, i32 0 + %tmp35 = insertelement <4 x float> %tmp34, float %clamp.i4, i32 1 + %tmp36 = insertelement <4 x float> %tmp35, float %clamp.i2, i32 2 + %tmp37 = insertelement <4 x float> %tmp36, float 1.000000e+00, i32 3 + call void @llvm.r600.store.swizzle(<4 x float> %tmp37, i32 0, i32 0) ret void -LOOP29: ; preds = %LOOP, %ENDIF30 +LOOP29: ; preds = %ENDIF30, %LOOP %temp6.1 = phi float [ %temp4.1, %ENDIF30 ], [ %temp6.0, %LOOP ] %temp5.1 = phi float [ %temp6.1, %ENDIF30 ], [ %temp5.0, %LOOP ] %temp4.1 = phi float [ %temp5.1, %ENDIF30 ], [ %temp4.0, %LOOP ] - %temp20.0 = phi float [ %50, %ENDIF30 ], [ 0.000000e+00, %LOOP ] - %38 = bitcast float %temp20.0 to i32 - %39 = bitcast float %16 to i32 - %40 = icmp sge i32 %38, %39 - %41 = sext i1 %40 to i32 - %42 = bitcast i32 %41 to float - %43 = bitcast float %42 to i32 - %44 = icmp ne i32 %43, 0 - br i1 %44, label %IF31, label %ENDIF30 + %temp20.0 = phi float [ %tmp50, %ENDIF30 ], [ 0.000000e+00, %LOOP ] + %tmp38 = bitcast float %temp20.0 to i32 + %tmp39 = bitcast float %tmp20 to i32 + %tmp40 = icmp sge i32 %tmp38, %tmp39 + %tmp41 = sext i1 %tmp40 to i32 + %tmp42 = bitcast i32 %tmp41 to float + %tmp43 = bitcast float %tmp42 to i32 + %tmp44 = icmp ne i32 %tmp43, 0 + br i1 %tmp44, label %IF31, label %ENDIF30 IF31: ; preds = %LOOP29 - %45 = bitcast float %temp12.0 to i32 - %46 = add i32 %45, 1 - %47 = bitcast i32 %46 to float + %tmp45 = bitcast float %temp12.0 to i32 + %tmp46 = add i32 %tmp45, 1 + %tmp47 = bitcast i32 %tmp46 to float br label %LOOP ENDIF30: ; preds = %LOOP29 - %48 = bitcast float %temp20.0 to i32 - %49 = add i32 %48, 1 - %50 = bitcast i32 %49 to float + %tmp48 = bitcast float %temp20.0 to i32 + %tmp49 = add i32 %tmp48, 1 + %tmp50 = bitcast i32 %tmp49 to float br label %LOOP29 } -declare float @llvm.AMDGPU.clamp.f32(float, float, float) #0 +declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) #0 +declare float @llvm.minnum.f32(float, float) #1 +declare float @llvm.maxnum.f32(float, float) #1 -declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) - -attributes #0 = { readnone } +attributes #0 = { nounwind } +attributes #1 = { nounwind readnone } |