brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.2 KiB · 8d9c1b6 Raw
91 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -amdgpu-codegenprepare-break-large-phis=false < %s | FileCheck %s2 3; CHECK-LABEL: {{^}}_amdgpu_ps_main:4;5; This test case used to hit an assertion in SIOptimizeVGPRLiveRange because of a vector with dead lanes6; leading to an effectively dead INSERT_SUBREG.7 8 9define dllexport amdgpu_ps void @_amdgpu_ps_main(i32 %descTable2) #0 {10.entry:11  %i2 = zext i32 %descTable2 to i6412  %i4 = inttoptr i64 %i2 to ptr addrspace(4)13  %i159 = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.image.sample.d.2d.v4f32.f32.f32(i32 15, float poison, float poison, float poison, float poison, float poison, float poison, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)14  %i1540 = shufflevector <4 x float> %i159, <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>15  %i1526 = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> poison, i32 2688, i32 0)16  %i1746 = load <4 x i32>, ptr addrspace(4) %i4, align 1617  br label %bb175018 19bb1750:                                           ; preds = %bb1897, %.entry20  %__llpc_global_proxy_r3.12.vec.extract2358295 = phi i32 [ 0, %.entry ], [ %__llpc_global_proxy_r3.12.vec.extract2358, %bb1897 ]21  %__llpc_global_proxy_r13.20293 = phi <4 x i32> [ poison, %.entry ], [ %__llpc_global_proxy_r13.22, %bb1897 ]22  %__llpc_global_proxy_r10.19291 = phi <4 x i32> [ poison, %.entry ], [ %i1914, %bb1897 ]23  %i1751 = call float @llvm.amdgcn.struct.buffer.load.format.f32(<4 x i32> %i1746, i32 poison, i32 0, i32 0, i32 0)24  %i1754 = shufflevector <4 x i32> %__llpc_global_proxy_r10.19291, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 7>25  %__llpc_global_proxy_r7.12.vec.extract1953260 = bitcast float %i1751 to i3226  %i1760 = or i32 %__llpc_global_proxy_r7.12.vec.extract1953260, %__llpc_global_proxy_r3.12.vec.extract235829527  %i1786 = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> poison, i32 %i1760, i32 0)28  %__llpc_global_proxy_r11.12.vec.insert1237 = insertelement <4 x i32> %i1754, i32 %i1786, i64 329  %.not2783 = icmp eq i32 %i1786, 030  br i1 %.not2783, label %bb1789, label %bb178731 32bb1787:                                           ; preds = %bb175033  %i1788 = shufflevector <4 x i32> <i32 0, i32 0, i32 0, i32 poison>, <4 x i32> %__llpc_global_proxy_r13.20293, <4 x i32> <i32 0, i32 1, i32 2, i32 7>34  br label %bb189735 36bb1789:                                           ; preds = %bb175037  %i1796 = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fmed3.f32(float poison, float 0.000000e+00, float 1.000000e+00)38  %i1797 = fmul reassoc nnan nsz arcp contract afn float %i1796, %i179639  %i1800 = fdiv reassoc nnan nsz arcp contract afn float %i1797, 0.000000e+0040  %i1801 = bitcast float %i1800 to i3241  %__llpc_global_proxy_r11.12.vec.insert1245 = insertelement <4 x i32> %__llpc_global_proxy_r11.12.vec.insert1237, i32 poison, i64 342  %i1818 = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fmed3.f32(float poison, float 0.000000e+00, float 1.000000e+00)43  %i1819 = bitcast float %i1818 to i3244  %i1878 = shufflevector <4 x i32> %__llpc_global_proxy_r11.12.vec.insert1245, <4 x i32> poison, <3 x i32> <i32 3, i32 3, i32 3>45  %i1879 = bitcast <3 x i32> %i1878 to <3 x float>46  %i1881 = fmul reassoc nnan nsz arcp contract afn <3 x float> %i1540, %i187947  %i1882 = call <3 x i32> @llvm.amdgcn.s.buffer.load.v3i32(<4 x i32> poison, i32 poison, i32 0)48  %i1883 = shufflevector <3 x i32> %i1882, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>49  %i1884 = bitcast <4 x i32> %i1883 to <4 x float>50  %i1885 = shufflevector <4 x float> %i1884, <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>51  %i1886 = insertelement <3 x i32> poison, i32 %i1819, i64 052  %i1887 = bitcast <3 x i32> %i1886 to <3 x float>53  %i1888 = insertelement <3 x i32> poison, i32 %i1801, i64 054  %i1889 = bitcast <3 x i32> %i1888 to <3 x float>55  %i1890 = fmul reassoc nnan nsz arcp contract afn <3 x float> %i1887, %i188956  %i1891 = shufflevector <3 x float> %i1890, <3 x float> poison, <3 x i32> zeroinitializer57  %i1892 = fmul reassoc nnan nsz arcp contract afn <3 x float> %i1885, %i189158  %i1893 = fmul reassoc nnan nsz arcp contract afn <3 x float> %i1892, %i188159  %i1894 = bitcast <3 x float> %i1893 to <3 x i32>60  %i1895 = shufflevector <3 x i32> %i1894, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>61  %i1896 = insertelement <4 x i32> %i1895, i32 %i1819, i64 362  br label %bb189763 64bb1897:                                           ; preds = %bb1789, %bb178765  %__llpc_global_proxy_r11.19 = phi <4 x i32> [ %__llpc_global_proxy_r11.12.vec.insert1237, %bb1787 ], [ %__llpc_global_proxy_r11.12.vec.insert1245, %bb1789 ]66  %__llpc_global_proxy_r13.22 = phi <4 x i32> [ %i1788, %bb1787 ], [ %i1896, %bb1789 ]67  %i1898 = shufflevector <4 x i32> %__llpc_global_proxy_r11.19, <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>68  %i1899 = bitcast <3 x i32> %i1898 to <3 x float>69  %i1900 = shufflevector <4 x i32> %__llpc_global_proxy_r13.22, <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>70  %i1901 = bitcast <3 x i32> %i1900 to <3 x float>71  %i1902 = fadd reassoc nnan nsz arcp contract afn <3 x float> %i1901, %i189972  %i1903 = bitcast <3 x float> %i1902 to <3 x i32>73  %i1907 = shufflevector <3 x i32> %i1903, <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>74  %i1908 = shufflevector <4 x i32> %i1907, <4 x i32> %__llpc_global_proxy_r11.19, <4 x i32> <i32 0, i32 1, i32 2, i32 7>75  %i1914 = shufflevector <4 x i32> %i1908, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 7>76  %__llpc_global_proxy_r3.12.vec.extract2358 = extractelement <2 x i32> zeroinitializer, i64 177  %.not2780.not = icmp ult i32 %__llpc_global_proxy_r3.12.vec.extract2358, %i152678  br i1 %.not2780.not, label %bb1750, label %._crit_edge29879 80._crit_edge298:                                   ; preds = %bb189781  ret void82}83 84declare <4 x float> @llvm.amdgcn.image.sample.d.2d.v4f32.f32.f32(i32 immarg, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1 immarg, i32 immarg, i32 immarg)85declare float @llvm.amdgcn.fmed3.f32(float, float, float)86declare float @llvm.amdgcn.struct.buffer.load.format.f32(<4 x i32>, i32, i32, i32, i32 immarg)87declare i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32>, i32, i32 immarg)88declare <3 x i32> @llvm.amdgcn.s.buffer.load.v3i32(<4 x i32>, i32, i32 immarg)89 90attributes #0 = { "target-features"=",+wavefrontsize64,+cumode" }91