Home | History | Annotate | Download | only in AMDGPU
      1 ; RUN: llc -march=amdgcn -mtriple=amdgcn---amdgiz -mcpu=tahiti -mattr=+vgpr-spilling -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=SI %s
      2 ; RUN: llc -march=amdgcn -mtriple=amdgcn---amdgiz -mcpu=fiji -mattr=+vgpr-spilling -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s
      3 ; RUN: llc -march=amdgcn -mtriple=amdgcn---amdgiz -mcpu=gfx900 -mattr=+vgpr-spilling -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GFX9 %s
      4 
      5 ; This ends up using all 255 registers and requires register
      6 ; scavenging which will fail to find an unsued register.
      7 
      8 ; Check the ScratchSize to avoid regressions from spilling
      9 ; intermediate register class copies.
     10 
     11 ; FIXME: The same register is initialized to 0 for every spill.
     12 ; FIXME: The unused arguments are removed
     13 
     14 ; GCN-LABEL: {{^}}main:
     15 
     16 ; GCN-NOT: s_mov_b32 s12
     17 ; GCN-DAG: s_mov_b32 s[[DESC0:[0-9]+]], SCRATCH_RSRC_DWORD0
     18 ; GCN-DAG: s_mov_b32 s{{[0-9]+}}, SCRATCH_RSRC_DWORD1
     19 ; GCN-DAG: s_mov_b32 s{{[0-9]+}}, -1
     20 ; SI-DAG: s_mov_b32 s[[DESC3:[0-9]+]], 0xe8f000
     21 ; VI-DAG: s_mov_b32 s[[DESC3:[0-9]+]], 0xe80000
     22 ; GFX9-DAG: s_mov_b32 s[[DESC3:[0-9]+]], 0xe00000
     23 
     24 ; OFFREG is offset system SGPR
     25 ; GCN: buffer_store_dword {{v[0-9]+}}, off, s{{\[}}[[DESC0]]:[[DESC3]]], s12 offset:{{[0-9]+}} ; 4-byte Folded Spill
     26 ; GCN: buffer_load_dword v{{[0-9]+}}, off, s{{\[}}[[DESC0]]:[[DESC3]]], s12 offset:{{[0-9]+}} ; 4-byte Folded Reload
     27 ; GCN: NumVgprs: 256
     28 ; GCN: ScratchSize: 1536
     29 
     30 define amdgpu_vs void @main([9 x <4 x i32>] addrspace(4)* byval %arg, [17 x <4 x i32>] addrspace(4)* byval %arg1, [17 x <4 x i32>] addrspace(4)* byval %arg2, [34 x <8 x i32>] addrspace(4)* byval %arg3, [16 x <4 x i32>] addrspace(4)* byval %arg4, i32 inreg %arg5, i32 inreg %arg6, i32 %arg7, i32 %arg8, i32 %arg9, i32 %arg10) #0 {
     31 bb:
     32   %tmp = getelementptr [17 x <4 x i32>], [17 x <4 x i32>] addrspace(4)* %arg1, i64 0, i64 0
     33   %tmp11 = load <4 x i32>, <4 x i32> addrspace(4)* %tmp, align 16, !tbaa !0
     34   %tmp12 = call float @llvm.SI.load.const.v4i32(<4 x i32> %tmp11, i32 0)
     35   %tmp13 = call float @llvm.SI.load.const.v4i32(<4 x i32> %tmp11, i32 16)
     36   %tmp14 = call float @llvm.SI.load.const.v4i32(<4 x i32> %tmp11, i32 32)
     37   %tmp15 = getelementptr [16 x <4 x i32>], [16 x <4 x i32>] addrspace(4)* %arg4, i64 0, i64 0
     38   %tmp16 = load <4 x i32>, <4 x i32> addrspace(4)* %tmp15, align 16, !tbaa !0
     39   %tmp17 = add i32 %arg5, %arg7
     40   %tmp16.cast = bitcast <4 x i32> %tmp16 to <4 x i32>
     41   %tmp18 = call <4 x float> @llvm.amdgcn.buffer.load.format.v4f32(<4 x i32> %tmp16.cast, i32 %tmp17, i32 0, i1 false, i1 false)
     42   %tmp19 = extractelement <4 x float> %tmp18, i32 0
     43   %tmp20 = extractelement <4 x float> %tmp18, i32 1
     44   %tmp21 = extractelement <4 x float> %tmp18, i32 2
     45   %tmp22 = extractelement <4 x float> %tmp18, i32 3
     46   %tmp23 = bitcast float %tmp14 to i32
     47   br label %bb24
     48 
     49 bb24:                                             ; preds = %bb157, %bb
     50   %tmp25 = phi float [ 0.000000e+00, %bb ], [ %tmp350, %bb157 ]
     51   %tmp26 = phi float [ 0.000000e+00, %bb ], [ %tmp349, %bb157 ]
     52   %tmp27 = phi float [ 0.000000e+00, %bb ], [ %tmp348, %bb157 ]
     53   %tmp28 = phi float [ 0.000000e+00, %bb ], [ %tmp351, %bb157 ]
     54   %tmp29 = phi float [ 0.000000e+00, %bb ], [ %tmp347, %bb157 ]
     55   %tmp30 = phi float [ 0.000000e+00, %bb ], [ %tmp346, %bb157 ]
     56   %tmp31 = phi float [ 0.000000e+00, %bb ], [ %tmp345, %bb157 ]
     57   %tmp32 = phi float [ 0.000000e+00, %bb ], [ %tmp352, %bb157 ]
     58   %tmp33 = phi float [ 0.000000e+00, %bb ], [ %tmp344, %bb157 ]
     59   %tmp34 = phi float [ 0.000000e+00, %bb ], [ %tmp343, %bb157 ]
     60   %tmp35 = phi float [ 0.000000e+00, %bb ], [ %tmp342, %bb157 ]
     61   %tmp36 = phi float [ 0.000000e+00, %bb ], [ %tmp353, %bb157 ]
     62   %tmp37 = phi float [ 0.000000e+00, %bb ], [ %tmp341, %bb157 ]
     63   %tmp38 = phi float [ 0.000000e+00, %bb ], [ %tmp340, %bb157 ]
     64   %tmp39 = phi float [ 0.000000e+00, %bb ], [ %tmp339, %bb157 ]
     65   %tmp40 = phi float [ 0.000000e+00, %bb ], [ %tmp354, %bb157 ]
     66   %tmp41 = phi float [ 0.000000e+00, %bb ], [ %tmp338, %bb157 ]
     67   %tmp42 = phi float [ 0.000000e+00, %bb ], [ %tmp337, %bb157 ]
     68   %tmp43 = phi float [ 0.000000e+00, %bb ], [ %tmp336, %bb157 ]
     69   %tmp44 = phi float [ 0.000000e+00, %bb ], [ %tmp355, %bb157 ]
     70   %tmp45 = phi float [ 0.000000e+00, %bb ], [ %tmp335, %bb157 ]
     71   %tmp46 = phi float [ 0.000000e+00, %bb ], [ %tmp334, %bb157 ]
     72   %tmp47 = phi float [ 0.000000e+00, %bb ], [ %tmp333, %bb157 ]
     73   %tmp48 = phi float [ 0.000000e+00, %bb ], [ %tmp356, %bb157 ]
     74   %tmp49 = phi float [ 0.000000e+00, %bb ], [ %tmp332, %bb157 ]
     75   %tmp50 = phi float [ 0.000000e+00, %bb ], [ %tmp331, %bb157 ]
     76   %tmp51 = phi float [ 0.000000e+00, %bb ], [ %tmp330, %bb157 ]
     77   %tmp52 = phi float [ 0.000000e+00, %bb ], [ %tmp357, %bb157 ]
     78   %tmp53 = phi float [ 0.000000e+00, %bb ], [ %tmp329, %bb157 ]
     79   %tmp54 = phi float [ 0.000000e+00, %bb ], [ %tmp328, %bb157 ]
     80   %tmp55 = phi float [ 0.000000e+00, %bb ], [ %tmp327, %bb157 ]
     81   %tmp56 = phi float [ 0.000000e+00, %bb ], [ %tmp358, %bb157 ]
     82   %tmp57 = phi float [ 0.000000e+00, %bb ], [ %tmp326, %bb157 ]
     83   %tmp58 = phi float [ 0.000000e+00, %bb ], [ %tmp325, %bb157 ]
     84   %tmp59 = phi float [ 0.000000e+00, %bb ], [ %tmp324, %bb157 ]
     85   %tmp60 = phi float [ 0.000000e+00, %bb ], [ %tmp359, %bb157 ]
     86   %tmp61 = phi float [ 0.000000e+00, %bb ], [ %tmp323, %bb157 ]
     87   %tmp62 = phi float [ 0.000000e+00, %bb ], [ %tmp322, %bb157 ]
     88   %tmp63 = phi float [ 0.000000e+00, %bb ], [ %tmp321, %bb157 ]
     89   %tmp64 = phi float [ 0.000000e+00, %bb ], [ %tmp360, %bb157 ]
     90   %tmp65 = phi float [ 0.000000e+00, %bb ], [ %tmp320, %bb157 ]
     91   %tmp66 = phi float [ 0.000000e+00, %bb ], [ %tmp319, %bb157 ]
     92   %tmp67 = phi float [ 0.000000e+00, %bb ], [ %tmp318, %bb157 ]
     93   %tmp68 = phi float [ 0.000000e+00, %bb ], [ %tmp361, %bb157 ]
     94   %tmp69 = phi float [ 0.000000e+00, %bb ], [ %tmp317, %bb157 ]
     95   %tmp70 = phi float [ 0.000000e+00, %bb ], [ %tmp316, %bb157 ]
     96   %tmp71 = phi float [ 0.000000e+00, %bb ], [ %tmp315, %bb157 ]
     97   %tmp72 = phi float [ 0.000000e+00, %bb ], [ %tmp362, %bb157 ]
     98   %tmp73 = phi float [ 0.000000e+00, %bb ], [ %tmp314, %bb157 ]
     99   %tmp74 = phi float [ 0.000000e+00, %bb ], [ %tmp313, %bb157 ]
    100   %tmp75 = phi float [ 0.000000e+00, %bb ], [ %tmp312, %bb157 ]
    101   %tmp76 = phi float [ 0.000000e+00, %bb ], [ %tmp363, %bb157 ]
    102   %tmp77 = phi float [ 0.000000e+00, %bb ], [ %tmp311, %bb157 ]
    103   %tmp78 = phi float [ 0.000000e+00, %bb ], [ %tmp310, %bb157 ]
    104   %tmp79 = phi float [ 0.000000e+00, %bb ], [ %tmp309, %bb157 ]
    105   %tmp80 = phi float [ 0.000000e+00, %bb ], [ %tmp364, %bb157 ]
    106   %tmp81 = phi float [ 0.000000e+00, %bb ], [ %tmp308, %bb157 ]
    107   %tmp82 = phi float [ 0.000000e+00, %bb ], [ %tmp307, %bb157 ]
    108   %tmp83 = phi float [ 0.000000e+00, %bb ], [ %tmp306, %bb157 ]
    109   %tmp84 = phi float [ 0.000000e+00, %bb ], [ %tmp365, %bb157 ]
    110   %tmp85 = phi float [ 0.000000e+00, %bb ], [ %tmp305, %bb157 ]
    111   %tmp86 = phi float [ 0.000000e+00, %bb ], [ %tmp304, %bb157 ]
    112   %tmp87 = phi float [ 0.000000e+00, %bb ], [ %tmp303, %bb157 ]
    113   %tmp88 = phi float [ 0.000000e+00, %bb ], [ %tmp366, %bb157 ]
    114   %tmp89 = phi float [ 0.000000e+00, %bb ], [ %tmp302, %bb157 ]
    115   %tmp90 = phi float [ 0.000000e+00, %bb ], [ %tmp301, %bb157 ]
    116   %tmp91 = phi float [ 0.000000e+00, %bb ], [ %tmp300, %bb157 ]
    117   %tmp92 = phi float [ 0.000000e+00, %bb ], [ %tmp367, %bb157 ]
    118   %tmp93 = phi float [ 0.000000e+00, %bb ], [ %tmp299, %bb157 ]
    119   %tmp94 = phi float [ 0.000000e+00, %bb ], [ %tmp298, %bb157 ]
    120   %tmp95 = phi float [ 0.000000e+00, %bb ], [ %tmp297, %bb157 ]
    121   %tmp96 = phi float [ 0.000000e+00, %bb ], [ %tmp368, %bb157 ]
    122   %tmp97 = phi float [ 0.000000e+00, %bb ], [ %tmp296, %bb157 ]
    123   %tmp98 = phi float [ 0.000000e+00, %bb ], [ %tmp295, %bb157 ]
    124   %tmp99 = phi float [ 0.000000e+00, %bb ], [ %tmp294, %bb157 ]
    125   %tmp100 = phi float [ 0.000000e+00, %bb ], [ %tmp369, %bb157 ]
    126   %tmp101 = phi float [ 0.000000e+00, %bb ], [ %tmp293, %bb157 ]
    127   %tmp102 = phi float [ 0.000000e+00, %bb ], [ %tmp292, %bb157 ]
    128   %tmp103 = phi float [ 0.000000e+00, %bb ], [ %tmp291, %bb157 ]
    129   %tmp104 = phi float [ 0.000000e+00, %bb ], [ %tmp370, %bb157 ]
    130   %tmp105 = phi float [ 0.000000e+00, %bb ], [ %tmp371, %bb157 ]
    131   %tmp106 = phi float [ 0.000000e+00, %bb ], [ %tmp372, %bb157 ]
    132   %tmp107 = phi float [ 0.000000e+00, %bb ], [ %tmp421, %bb157 ]
    133   %tmp108 = phi float [ 0.000000e+00, %bb ], [ %tmp373, %bb157 ]
    134   %tmp109 = phi float [ 0.000000e+00, %bb ], [ %tmp374, %bb157 ]
    135   %tmp110 = phi float [ 0.000000e+00, %bb ], [ %tmp375, %bb157 ]
    136   %tmp111 = phi float [ 0.000000e+00, %bb ], [ %tmp376, %bb157 ]
    137   %tmp112 = phi float [ 0.000000e+00, %bb ], [ %tmp377, %bb157 ]
    138   %tmp113 = phi float [ 0.000000e+00, %bb ], [ %tmp378, %bb157 ]
    139   %tmp114 = phi float [ 0.000000e+00, %bb ], [ %tmp379, %bb157 ]
    140   %tmp115 = phi float [ 0.000000e+00, %bb ], [ %tmp380, %bb157 ]
    141   %tmp116 = phi float [ 0.000000e+00, %bb ], [ %tmp381, %bb157 ]
    142   %tmp117 = phi float [ 0.000000e+00, %bb ], [ %tmp382, %bb157 ]
    143   %tmp118 = phi float [ 0.000000e+00, %bb ], [ %tmp383, %bb157 ]
    144   %tmp119 = phi float [ 0.000000e+00, %bb ], [ %tmp384, %bb157 ]
    145   %tmp120 = phi float [ 0.000000e+00, %bb ], [ %tmp385, %bb157 ]
    146   %tmp121 = phi float [ 0.000000e+00, %bb ], [ %tmp386, %bb157 ]
    147   %tmp122 = phi float [ 0.000000e+00, %bb ], [ %tmp387, %bb157 ]
    148   %tmp123 = phi float [ 0.000000e+00, %bb ], [ %tmp388, %bb157 ]
    149   %tmp124 = phi float [ 0.000000e+00, %bb ], [ %tmp389, %bb157 ]
    150   %tmp125 = phi float [ 0.000000e+00, %bb ], [ %tmp390, %bb157 ]
    151   %tmp126 = phi float [ 0.000000e+00, %bb ], [ %tmp391, %bb157 ]
    152   %tmp127 = phi float [ 0.000000e+00, %bb ], [ %tmp392, %bb157 ]
    153   %tmp128 = phi float [ 0.000000e+00, %bb ], [ %tmp393, %bb157 ]
    154   %tmp129 = phi float [ 0.000000e+00, %bb ], [ %tmp394, %bb157 ]
    155   %tmp130 = phi float [ 0.000000e+00, %bb ], [ %tmp395, %bb157 ]
    156   %tmp131 = phi float [ 0.000000e+00, %bb ], [ %tmp396, %bb157 ]
    157   %tmp132 = phi float [ 0.000000e+00, %bb ], [ %tmp397, %bb157 ]
    158   %tmp133 = phi float [ 0.000000e+00, %bb ], [ %tmp398, %bb157 ]
    159   %tmp134 = phi float [ 0.000000e+00, %bb ], [ %tmp399, %bb157 ]
    160   %tmp135 = phi float [ 0.000000e+00, %bb ], [ %tmp400, %bb157 ]
    161   %tmp136 = phi float [ 0.000000e+00, %bb ], [ %tmp401, %bb157 ]
    162   %tmp137 = phi float [ 0.000000e+00, %bb ], [ %tmp402, %bb157 ]
    163   %tmp138 = phi float [ 0.000000e+00, %bb ], [ %tmp403, %bb157 ]
    164   %tmp139 = phi float [ 0.000000e+00, %bb ], [ %tmp404, %bb157 ]
    165   %tmp140 = phi float [ 0.000000e+00, %bb ], [ %tmp405, %bb157 ]
    166   %tmp141 = phi float [ 0.000000e+00, %bb ], [ %tmp406, %bb157 ]
    167   %tmp142 = phi float [ 0.000000e+00, %bb ], [ %tmp407, %bb157 ]
    168   %tmp143 = phi float [ 0.000000e+00, %bb ], [ %tmp408, %bb157 ]
    169   %tmp144 = phi float [ 0.000000e+00, %bb ], [ %tmp409, %bb157 ]
    170   %tmp145 = phi float [ 0.000000e+00, %bb ], [ %tmp410, %bb157 ]
    171   %tmp146 = phi float [ 0.000000e+00, %bb ], [ %tmp411, %bb157 ]
    172   %tmp147 = phi float [ 0.000000e+00, %bb ], [ %tmp412, %bb157 ]
    173   %tmp148 = phi float [ 0.000000e+00, %bb ], [ %tmp413, %bb157 ]
    174   %tmp149 = phi float [ 0.000000e+00, %bb ], [ %tmp414, %bb157 ]
    175   %tmp150 = phi float [ 0.000000e+00, %bb ], [ %tmp415, %bb157 ]
    176   %tmp151 = phi float [ 0.000000e+00, %bb ], [ %tmp416, %bb157 ]
    177   %tmp152 = phi float [ 0.000000e+00, %bb ], [ %tmp417, %bb157 ]
    178   %tmp153 = phi float [ 0.000000e+00, %bb ], [ %tmp418, %bb157 ]
    179   %tmp154 = bitcast float %tmp107 to i32
    180   %tid = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #1
    181   %tmp155 = icmp sgt i32 %tmp154, %tid
    182   br i1 %tmp155, label %bb156, label %bb157
    183 
    184 bb156:                                            ; preds = %bb24
    185   call void @llvm.amdgcn.exp.f32(i32 32, i32 15, float %tmp12, float %tmp103, float %tmp102, float %tmp101, i1 false, i1 false) #0
    186   call void @llvm.amdgcn.exp.f32(i32 33, i32 15, float %tmp99, float %tmp98, float %tmp97, float %tmp95, i1 false, i1 false) #0
    187   call void @llvm.amdgcn.exp.f32(i32 34, i32 15, float %tmp94, float %tmp93, float %tmp91, float %tmp90, i1 false, i1 false) #0
    188   call void @llvm.amdgcn.exp.f32(i32 35, i32 15, float %tmp89, float %tmp87, float %tmp86, float %tmp85, i1 false, i1 false) #0
    189   call void @llvm.amdgcn.exp.f32(i32 36, i32 15, float %tmp83, float %tmp82, float %tmp81, float %tmp79, i1 false, i1 false) #0
    190   call void @llvm.amdgcn.exp.f32(i32 37, i32 15, float %tmp78, float %tmp77, float %tmp75, float %tmp74, i1 false, i1 false) #0
    191   call void @llvm.amdgcn.exp.f32(i32 38, i32 15, float %tmp73, float %tmp71, float %tmp70, float %tmp69, i1 false, i1 false) #0
    192   call void @llvm.amdgcn.exp.f32(i32 39, i32 15, float %tmp67, float %tmp66, float %tmp65, float %tmp63, i1 false, i1 false) #0
    193   call void @llvm.amdgcn.exp.f32(i32 40, i32 15, float %tmp62, float %tmp61, float %tmp59, float %tmp58, i1 false, i1 false) #0
    194   call void @llvm.amdgcn.exp.f32(i32 41, i32 15, float %tmp57, float %tmp55, float %tmp54, float %tmp53, i1 false, i1 false) #0
    195   call void @llvm.amdgcn.exp.f32(i32 42, i32 15, float %tmp51, float %tmp50, float %tmp49, float %tmp47, i1 false, i1 false) #0
    196   call void @llvm.amdgcn.exp.f32(i32 43, i32 15, float %tmp46, float %tmp45, float %tmp43, float %tmp42, i1 false, i1 false) #0
    197   call void @llvm.amdgcn.exp.f32(i32 44, i32 15, float %tmp41, float %tmp39, float %tmp38, float %tmp37, i1 false, i1 false) #0
    198   call void @llvm.amdgcn.exp.f32(i32 45, i32 15, float %tmp35, float %tmp34, float %tmp33, float %tmp31, i1 false, i1 false) #0
    199   call void @llvm.amdgcn.exp.f32(i32 46, i32 15, float %tmp30, float %tmp29, float %tmp27, float %tmp26, i1 false, i1 false) #0
    200   call void @llvm.amdgcn.exp.f32(i32 47, i32 15, float %tmp25, float %tmp28, float %tmp32, float %tmp36, i1 false, i1 false) #0
    201   call void @llvm.amdgcn.exp.f32(i32 48, i32 15, float %tmp40, float %tmp44, float %tmp48, float %tmp52, i1 false, i1 false) #0
    202   call void @llvm.amdgcn.exp.f32(i32 49, i32 15, float %tmp56, float %tmp60, float %tmp64, float %tmp68, i1 false, i1 false) #0
    203   call void @llvm.amdgcn.exp.f32(i32 50, i32 15, float %tmp72, float %tmp76, float %tmp80, float %tmp84, i1 false, i1 false) #0
    204   call void @llvm.amdgcn.exp.f32(i32 51, i32 15, float %tmp88, float %tmp92, float %tmp96, float %tmp100, i1 false, i1 false) #0
    205   call void @llvm.amdgcn.exp.f32(i32 52, i32 15, float %tmp104, float %tmp105, float %tmp106, float %tmp108, i1 false, i1 false) #0
    206   call void @llvm.amdgcn.exp.f32(i32 53, i32 15, float %tmp109, float %tmp110, float %tmp111, float %tmp112, i1 false, i1 false) #0
    207   call void @llvm.amdgcn.exp.f32(i32 54, i32 15, float %tmp113, float %tmp114, float %tmp115, float %tmp116, i1 false, i1 false) #0
    208   call void @llvm.amdgcn.exp.f32(i32 55, i32 15, float %tmp117, float %tmp118, float %tmp119, float %tmp120, i1 false, i1 false) #0
    209   call void @llvm.amdgcn.exp.f32(i32 56, i32 15, float %tmp121, float %tmp122, float %tmp123, float %tmp124, i1 false, i1 false) #0
    210   call void @llvm.amdgcn.exp.f32(i32 57, i32 15, float %tmp125, float %tmp126, float %tmp127, float %tmp128, i1 false, i1 false) #0
    211   call void @llvm.amdgcn.exp.f32(i32 58, i32 15, float %tmp129, float %tmp130, float %tmp131, float %tmp132, i1 false, i1 false) #0
    212   call void @llvm.amdgcn.exp.f32(i32 59, i32 15, float %tmp133, float %tmp134, float %tmp135, float %tmp136, i1 false, i1 false) #0
    213   call void @llvm.amdgcn.exp.f32(i32 60, i32 15, float %tmp137, float %tmp138, float %tmp139, float %tmp140, i1 false, i1 false) #0
    214   call void @llvm.amdgcn.exp.f32(i32 61, i32 15, float %tmp141, float %tmp142, float %tmp143, float %tmp144, i1 false, i1 false) #0
    215   call void @llvm.amdgcn.exp.f32(i32 62, i32 15, float %tmp145, float %tmp146, float %tmp147, float %tmp148, i1 false, i1 false) #0
    216   call void @llvm.amdgcn.exp.f32(i32 63, i32 15, float %tmp149, float %tmp150, float %tmp151, float %tmp13, i1 false, i1 false) #0
    217   call void @llvm.amdgcn.exp.f32(i32 12, i32 15, float %tmp19, float %tmp20, float %tmp21, float %tmp22, i1 true, i1 false) #0
    218   ret void
    219 
    220 bb157:                                            ; preds = %bb24
    221   %tmp158 = bitcast float %tmp107 to i32
    222   %tmp159 = bitcast float %tmp107 to i32
    223   %tmp160 = add i32 %tmp23, %tmp159
    224   %tmp161 = bitcast i32 %tmp160 to float
    225   %tmp162 = insertelement <128 x float> undef, float %tmp103, i32 0
    226   %tmp163 = insertelement <128 x float> %tmp162, float %tmp102, i32 1
    227   %tmp164 = insertelement <128 x float> %tmp163, float %tmp101, i32 2
    228   %tmp165 = insertelement <128 x float> %tmp164, float %tmp99, i32 3
    229   %tmp166 = insertelement <128 x float> %tmp165, float %tmp98, i32 4
    230   %tmp167 = insertelement <128 x float> %tmp166, float %tmp97, i32 5
    231   %tmp168 = insertelement <128 x float> %tmp167, float %tmp95, i32 6
    232   %tmp169 = insertelement <128 x float> %tmp168, float %tmp94, i32 7
    233   %tmp170 = insertelement <128 x float> %tmp169, float %tmp93, i32 8
    234   %tmp171 = insertelement <128 x float> %tmp170, float %tmp91, i32 9
    235   %tmp172 = insertelement <128 x float> %tmp171, float %tmp90, i32 10
    236   %tmp173 = insertelement <128 x float> %tmp172, float %tmp89, i32 11
    237   %tmp174 = insertelement <128 x float> %tmp173, float %tmp87, i32 12
    238   %tmp175 = insertelement <128 x float> %tmp174, float %tmp86, i32 13
    239   %tmp176 = insertelement <128 x float> %tmp175, float %tmp85, i32 14
    240   %tmp177 = insertelement <128 x float> %tmp176, float %tmp83, i32 15
    241   %tmp178 = insertelement <128 x float> %tmp177, float %tmp82, i32 16
    242   %tmp179 = insertelement <128 x float> %tmp178, float %tmp81, i32 17
    243   %tmp180 = insertelement <128 x float> %tmp179, float %tmp79, i32 18
    244   %tmp181 = insertelement <128 x float> %tmp180, float %tmp78, i32 19
    245   %tmp182 = insertelement <128 x float> %tmp181, float %tmp77, i32 20
    246   %tmp183 = insertelement <128 x float> %tmp182, float %tmp75, i32 21
    247   %tmp184 = insertelement <128 x float> %tmp183, float %tmp74, i32 22
    248   %tmp185 = insertelement <128 x float> %tmp184, float %tmp73, i32 23
    249   %tmp186 = insertelement <128 x float> %tmp185, float %tmp71, i32 24
    250   %tmp187 = insertelement <128 x float> %tmp186, float %tmp70, i32 25
    251   %tmp188 = insertelement <128 x float> %tmp187, float %tmp69, i32 26
    252   %tmp189 = insertelement <128 x float> %tmp188, float %tmp67, i32 27
    253   %tmp190 = insertelement <128 x float> %tmp189, float %tmp66, i32 28
    254   %tmp191 = insertelement <128 x float> %tmp190, float %tmp65, i32 29
    255   %tmp192 = insertelement <128 x float> %tmp191, float %tmp63, i32 30
    256   %tmp193 = insertelement <128 x float> %tmp192, float %tmp62, i32 31
    257   %tmp194 = insertelement <128 x float> %tmp193, float %tmp61, i32 32
    258   %tmp195 = insertelement <128 x float> %tmp194, float %tmp59, i32 33
    259   %tmp196 = insertelement <128 x float> %tmp195, float %tmp58, i32 34
    260   %tmp197 = insertelement <128 x float> %tmp196, float %tmp57, i32 35
    261   %tmp198 = insertelement <128 x float> %tmp197, float %tmp55, i32 36
    262   %tmp199 = insertelement <128 x float> %tmp198, float %tmp54, i32 37
    263   %tmp200 = insertelement <128 x float> %tmp199, float %tmp53, i32 38
    264   %tmp201 = insertelement <128 x float> %tmp200, float %tmp51, i32 39
    265   %tmp202 = insertelement <128 x float> %tmp201, float %tmp50, i32 40
    266   %tmp203 = insertelement <128 x float> %tmp202, float %tmp49, i32 41
    267   %tmp204 = insertelement <128 x float> %tmp203, float %tmp47, i32 42
    268   %tmp205 = insertelement <128 x float> %tmp204, float %tmp46, i32 43
    269   %tmp206 = insertelement <128 x float> %tmp205, float %tmp45, i32 44
    270   %tmp207 = insertelement <128 x float> %tmp206, float %tmp43, i32 45
    271   %tmp208 = insertelement <128 x float> %tmp207, float %tmp42, i32 46
    272   %tmp209 = insertelement <128 x float> %tmp208, float %tmp41, i32 47
    273   %tmp210 = insertelement <128 x float> %tmp209, float %tmp39, i32 48
    274   %tmp211 = insertelement <128 x float> %tmp210, float %tmp38, i32 49
    275   %tmp212 = insertelement <128 x float> %tmp211, float %tmp37, i32 50
    276   %tmp213 = insertelement <128 x float> %tmp212, float %tmp35, i32 51
    277   %tmp214 = insertelement <128 x float> %tmp213, float %tmp34, i32 52
    278   %tmp215 = insertelement <128 x float> %tmp214, float %tmp33, i32 53
    279   %tmp216 = insertelement <128 x float> %tmp215, float %tmp31, i32 54
    280   %tmp217 = insertelement <128 x float> %tmp216, float %tmp30, i32 55
    281   %tmp218 = insertelement <128 x float> %tmp217, float %tmp29, i32 56
    282   %tmp219 = insertelement <128 x float> %tmp218, float %tmp27, i32 57
    283   %tmp220 = insertelement <128 x float> %tmp219, float %tmp26, i32 58
    284   %tmp221 = insertelement <128 x float> %tmp220, float %tmp25, i32 59
    285   %tmp222 = insertelement <128 x float> %tmp221, float %tmp28, i32 60
    286   %tmp223 = insertelement <128 x float> %tmp222, float %tmp32, i32 61
    287   %tmp224 = insertelement <128 x float> %tmp223, float %tmp36, i32 62
    288   %tmp225 = insertelement <128 x float> %tmp224, float %tmp40, i32 63
    289   %tmp226 = insertelement <128 x float> %tmp225, float %tmp44, i32 64
    290   %tmp227 = insertelement <128 x float> %tmp226, float %tmp48, i32 65
    291   %tmp228 = insertelement <128 x float> %tmp227, float %tmp52, i32 66
    292   %tmp229 = insertelement <128 x float> %tmp228, float %tmp56, i32 67
    293   %tmp230 = insertelement <128 x float> %tmp229, float %tmp60, i32 68
    294   %tmp231 = insertelement <128 x float> %tmp230, float %tmp64, i32 69
    295   %tmp232 = insertelement <128 x float> %tmp231, float %tmp68, i32 70
    296   %tmp233 = insertelement <128 x float> %tmp232, float %tmp72, i32 71
    297   %tmp234 = insertelement <128 x float> %tmp233, float %tmp76, i32 72
    298   %tmp235 = insertelement <128 x float> %tmp234, float %tmp80, i32 73
    299   %tmp236 = insertelement <128 x float> %tmp235, float %tmp84, i32 74
    300   %tmp237 = insertelement <128 x float> %tmp236, float %tmp88, i32 75
    301   %tmp238 = insertelement <128 x float> %tmp237, float %tmp92, i32 76
    302   %tmp239 = insertelement <128 x float> %tmp238, float %tmp96, i32 77
    303   %tmp240 = insertelement <128 x float> %tmp239, float %tmp100, i32 78
    304   %tmp241 = insertelement <128 x float> %tmp240, float %tmp104, i32 79
    305   %tmp242 = insertelement <128 x float> %tmp241, float %tmp105, i32 80
    306   %tmp243 = insertelement <128 x float> %tmp242, float %tmp106, i32 81
    307   %tmp244 = insertelement <128 x float> %tmp243, float %tmp108, i32 82
    308   %tmp245 = insertelement <128 x float> %tmp244, float %tmp109, i32 83
    309   %tmp246 = insertelement <128 x float> %tmp245, float %tmp110, i32 84
    310   %tmp247 = insertelement <128 x float> %tmp246, float %tmp111, i32 85
    311   %tmp248 = insertelement <128 x float> %tmp247, float %tmp112, i32 86
    312   %tmp249 = insertelement <128 x float> %tmp248, float %tmp113, i32 87
    313   %tmp250 = insertelement <128 x float> %tmp249, float %tmp114, i32 88
    314   %tmp251 = insertelement <128 x float> %tmp250, float %tmp115, i32 89
    315   %tmp252 = insertelement <128 x float> %tmp251, float %tmp116, i32 90
    316   %tmp253 = insertelement <128 x float> %tmp252, float %tmp117, i32 91
    317   %tmp254 = insertelement <128 x float> %tmp253, float %tmp118, i32 92
    318   %tmp255 = insertelement <128 x float> %tmp254, float %tmp119, i32 93
    319   %tmp256 = insertelement <128 x float> %tmp255, float %tmp120, i32 94
    320   %tmp257 = insertelement <128 x float> %tmp256, float %tmp121, i32 95
    321   %tmp258 = insertelement <128 x float> %tmp257, float %tmp122, i32 96
    322   %tmp259 = insertelement <128 x float> %tmp258, float %tmp123, i32 97
    323   %tmp260 = insertelement <128 x float> %tmp259, float %tmp124, i32 98
    324   %tmp261 = insertelement <128 x float> %tmp260, float %tmp125, i32 99
    325   %tmp262 = insertelement <128 x float> %tmp261, float %tmp126, i32 100
    326   %tmp263 = insertelement <128 x float> %tmp262, float %tmp127, i32 101
    327   %tmp264 = insertelement <128 x float> %tmp263, float %tmp128, i32 102
    328   %tmp265 = insertelement <128 x float> %tmp264, float %tmp129, i32 103
    329   %tmp266 = insertelement <128 x float> %tmp265, float %tmp130, i32 104
    330   %tmp267 = insertelement <128 x float> %tmp266, float %tmp131, i32 105
    331   %tmp268 = insertelement <128 x float> %tmp267, float %tmp132, i32 106
    332   %tmp269 = insertelement <128 x float> %tmp268, float %tmp133, i32 107
    333   %tmp270 = insertelement <128 x float> %tmp269, float %tmp134, i32 108
    334   %tmp271 = insertelement <128 x float> %tmp270, float %tmp135, i32 109
    335   %tmp272 = insertelement <128 x float> %tmp271, float %tmp136, i32 110
    336   %tmp273 = insertelement <128 x float> %tmp272, float %tmp137, i32 111
    337   %tmp274 = insertelement <128 x float> %tmp273, float %tmp138, i32 112
    338   %tmp275 = insertelement <128 x float> %tmp274, float %tmp139, i32 113
    339   %tmp276 = insertelement <128 x float> %tmp275, float %tmp140, i32 114
    340   %tmp277 = insertelement <128 x float> %tmp276, float %tmp141, i32 115
    341   %tmp278 = insertelement <128 x float> %tmp277, float %tmp142, i32 116
    342   %tmp279 = insertelement <128 x float> %tmp278, float %tmp143, i32 117
    343   %tmp280 = insertelement <128 x float> %tmp279, float %tmp144, i32 118
    344   %tmp281 = insertelement <128 x float> %tmp280, float %tmp145, i32 119
    345   %tmp282 = insertelement <128 x float> %tmp281, float %tmp146, i32 120
    346   %tmp283 = insertelement <128 x float> %tmp282, float %tmp147, i32 121
    347   %tmp284 = insertelement <128 x float> %tmp283, float %tmp148, i32 122
    348   %tmp285 = insertelement <128 x float> %tmp284, float %tmp149, i32 123
    349   %tmp286 = insertelement <128 x float> %tmp285, float %tmp150, i32 124
    350   %tmp287 = insertelement <128 x float> %tmp286, float %tmp151, i32 125
    351   %tmp288 = insertelement <128 x float> %tmp287, float %tmp152, i32 126
    352   %tmp289 = insertelement <128 x float> %tmp288, float %tmp153, i32 127
    353   %tmp290 = insertelement <128 x float> %tmp289, float %tmp161, i32 %tmp158
    354   %tmp291 = extractelement <128 x float> %tmp290, i32 0
    355   %tmp292 = extractelement <128 x float> %tmp290, i32 1
    356   %tmp293 = extractelement <128 x float> %tmp290, i32 2
    357   %tmp294 = extractelement <128 x float> %tmp290, i32 3
    358   %tmp295 = extractelement <128 x float> %tmp290, i32 4
    359   %tmp296 = extractelement <128 x float> %tmp290, i32 5
    360   %tmp297 = extractelement <128 x float> %tmp290, i32 6
    361   %tmp298 = extractelement <128 x float> %tmp290, i32 7
    362   %tmp299 = extractelement <128 x float> %tmp290, i32 8
    363   %tmp300 = extractelement <128 x float> %tmp290, i32 9
    364   %tmp301 = extractelement <128 x float> %tmp290, i32 10
    365   %tmp302 = extractelement <128 x float> %tmp290, i32 11
    366   %tmp303 = extractelement <128 x float> %tmp290, i32 12
    367   %tmp304 = extractelement <128 x float> %tmp290, i32 13
    368   %tmp305 = extractelement <128 x float> %tmp290, i32 14
    369   %tmp306 = extractelement <128 x float> %tmp290, i32 15
    370   %tmp307 = extractelement <128 x float> %tmp290, i32 16
    371   %tmp308 = extractelement <128 x float> %tmp290, i32 17
    372   %tmp309 = extractelement <128 x float> %tmp290, i32 18
    373   %tmp310 = extractelement <128 x float> %tmp290, i32 19
    374   %tmp311 = extractelement <128 x float> %tmp290, i32 20
    375   %tmp312 = extractelement <128 x float> %tmp290, i32 21
    376   %tmp313 = extractelement <128 x float> %tmp290, i32 22
    377   %tmp314 = extractelement <128 x float> %tmp290, i32 23
    378   %tmp315 = extractelement <128 x float> %tmp290, i32 24
    379   %tmp316 = extractelement <128 x float> %tmp290, i32 25
    380   %tmp317 = extractelement <128 x float> %tmp290, i32 26
    381   %tmp318 = extractelement <128 x float> %tmp290, i32 27
    382   %tmp319 = extractelement <128 x float> %tmp290, i32 28
    383   %tmp320 = extractelement <128 x float> %tmp290, i32 29
    384   %tmp321 = extractelement <128 x float> %tmp290, i32 30
    385   %tmp322 = extractelement <128 x float> %tmp290, i32 31
    386   %tmp323 = extractelement <128 x float> %tmp290, i32 32
    387   %tmp324 = extractelement <128 x float> %tmp290, i32 33
    388   %tmp325 = extractelement <128 x float> %tmp290, i32 34
    389   %tmp326 = extractelement <128 x float> %tmp290, i32 35
    390   %tmp327 = extractelement <128 x float> %tmp290, i32 36
    391   %tmp328 = extractelement <128 x float> %tmp290, i32 37
    392   %tmp329 = extractelement <128 x float> %tmp290, i32 38
    393   %tmp330 = extractelement <128 x float> %tmp290, i32 39
    394   %tmp331 = extractelement <128 x float> %tmp290, i32 40
    395   %tmp332 = extractelement <128 x float> %tmp290, i32 41
    396   %tmp333 = extractelement <128 x float> %tmp290, i32 42
    397   %tmp334 = extractelement <128 x float> %tmp290, i32 43
    398   %tmp335 = extractelement <128 x float> %tmp290, i32 44
    399   %tmp336 = extractelement <128 x float> %tmp290, i32 45
    400   %tmp337 = extractelement <128 x float> %tmp290, i32 46
    401   %tmp338 = extractelement <128 x float> %tmp290, i32 47
    402   %tmp339 = extractelement <128 x float> %tmp290, i32 48
    403   %tmp340 = extractelement <128 x float> %tmp290, i32 49
    404   %tmp341 = extractelement <128 x float> %tmp290, i32 50
    405   %tmp342 = extractelement <128 x float> %tmp290, i32 51
    406   %tmp343 = extractelement <128 x float> %tmp290, i32 52
    407   %tmp344 = extractelement <128 x float> %tmp290, i32 53
    408   %tmp345 = extractelement <128 x float> %tmp290, i32 54
    409   %tmp346 = extractelement <128 x float> %tmp290, i32 55
    410   %tmp347 = extractelement <128 x float> %tmp290, i32 56
    411   %tmp348 = extractelement <128 x float> %tmp290, i32 57
    412   %tmp349 = extractelement <128 x float> %tmp290, i32 58
    413   %tmp350 = extractelement <128 x float> %tmp290, i32 59
    414   %tmp351 = extractelement <128 x float> %tmp290, i32 60
    415   %tmp352 = extractelement <128 x float> %tmp290, i32 61
    416   %tmp353 = extractelement <128 x float> %tmp290, i32 62
    417   %tmp354 = extractelement <128 x float> %tmp290, i32 63
    418   %tmp355 = extractelement <128 x float> %tmp290, i32 64
    419   %tmp356 = extractelement <128 x float> %tmp290, i32 65
    420   %tmp357 = extractelement <128 x float> %tmp290, i32 66
    421   %tmp358 = extractelement <128 x float> %tmp290, i32 67
    422   %tmp359 = extractelement <128 x float> %tmp290, i32 68
    423   %tmp360 = extractelement <128 x float> %tmp290, i32 69
    424   %tmp361 = extractelement <128 x float> %tmp290, i32 70
    425   %tmp362 = extractelement <128 x float> %tmp290, i32 71
    426   %tmp363 = extractelement <128 x float> %tmp290, i32 72
    427   %tmp364 = extractelement <128 x float> %tmp290, i32 73
    428   %tmp365 = extractelement <128 x float> %tmp290, i32 74
    429   %tmp366 = extractelement <128 x float> %tmp290, i32 75
    430   %tmp367 = extractelement <128 x float> %tmp290, i32 76
    431   %tmp368 = extractelement <128 x float> %tmp290, i32 77
    432   %tmp369 = extractelement <128 x float> %tmp290, i32 78
    433   %tmp370 = extractelement <128 x float> %tmp290, i32 79
    434   %tmp371 = extractelement <128 x float> %tmp290, i32 80
    435   %tmp372 = extractelement <128 x float> %tmp290, i32 81
    436   %tmp373 = extractelement <128 x float> %tmp290, i32 82
    437   %tmp374 = extractelement <128 x float> %tmp290, i32 83
    438   %tmp375 = extractelement <128 x float> %tmp290, i32 84
    439   %tmp376 = extractelement <128 x float> %tmp290, i32 85
    440   %tmp377 = extractelement <128 x float> %tmp290, i32 86
    441   %tmp378 = extractelement <128 x float> %tmp290, i32 87
    442   %tmp379 = extractelement <128 x float> %tmp290, i32 88
    443   %tmp380 = extractelement <128 x float> %tmp290, i32 89
    444   %tmp381 = extractelement <128 x float> %tmp290, i32 90
    445   %tmp382 = extractelement <128 x float> %tmp290, i32 91
    446   %tmp383 = extractelement <128 x float> %tmp290, i32 92
    447   %tmp384 = extractelement <128 x float> %tmp290, i32 93
    448   %tmp385 = extractelement <128 x float> %tmp290, i32 94
    449   %tmp386 = extractelement <128 x float> %tmp290, i32 95
    450   %tmp387 = extractelement <128 x float> %tmp290, i32 96
    451   %tmp388 = extractelement <128 x float> %tmp290, i32 97
    452   %tmp389 = extractelement <128 x float> %tmp290, i32 98
    453   %tmp390 = extractelement <128 x float> %tmp290, i32 99
    454   %tmp391 = extractelement <128 x float> %tmp290, i32 100
    455   %tmp392 = extractelement <128 x float> %tmp290, i32 101
    456   %tmp393 = extractelement <128 x float> %tmp290, i32 102
    457   %tmp394 = extractelement <128 x float> %tmp290, i32 103
    458   %tmp395 = extractelement <128 x float> %tmp290, i32 104
    459   %tmp396 = extractelement <128 x float> %tmp290, i32 105
    460   %tmp397 = extractelement <128 x float> %tmp290, i32 106
    461   %tmp398 = extractelement <128 x float> %tmp290, i32 107
    462   %tmp399 = extractelement <128 x float> %tmp290, i32 108
    463   %tmp400 = extractelement <128 x float> %tmp290, i32 109
    464   %tmp401 = extractelement <128 x float> %tmp290, i32 110
    465   %tmp402 = extractelement <128 x float> %tmp290, i32 111
    466   %tmp403 = extractelement <128 x float> %tmp290, i32 112
    467   %tmp404 = extractelement <128 x float> %tmp290, i32 113
    468   %tmp405 = extractelement <128 x float> %tmp290, i32 114
    469   %tmp406 = extractelement <128 x float> %tmp290, i32 115
    470   %tmp407 = extractelement <128 x float> %tmp290, i32 116
    471   %tmp408 = extractelement <128 x float> %tmp290, i32 117
    472   %tmp409 = extractelement <128 x float> %tmp290, i32 118
    473   %tmp410 = extractelement <128 x float> %tmp290, i32 119
    474   %tmp411 = extractelement <128 x float> %tmp290, i32 120
    475   %tmp412 = extractelement <128 x float> %tmp290, i32 121
    476   %tmp413 = extractelement <128 x float> %tmp290, i32 122
    477   %tmp414 = extractelement <128 x float> %tmp290, i32 123
    478   %tmp415 = extractelement <128 x float> %tmp290, i32 124
    479   %tmp416 = extractelement <128 x float> %tmp290, i32 125
    480   %tmp417 = extractelement <128 x float> %tmp290, i32 126
    481   %tmp418 = extractelement <128 x float> %tmp290, i32 127
    482   %tmp419 = bitcast float %tmp107 to i32
    483   %tmp420 = add i32 %tmp419, 1
    484   %tmp421 = bitcast i32 %tmp420 to float
    485   br label %bb24
    486 }
    487 
    488 declare i32 @llvm.amdgcn.mbcnt.lo(i32, i32) #1
    489 declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #0
    490 
    491 declare float @llvm.SI.load.const.v4i32(<4 x i32>, i32) #1
    492 declare <4 x float> @llvm.amdgcn.buffer.load.format.v4f32(<4 x i32>, i32, i32, i1, i1) #2
    493 
    494 attributes #0 = { nounwind }
    495 attributes #1 = { nounwind readnone }
    496 attributes #2 = { nounwind readonly }
    497 
    498 !0 = !{!1, !1, i64 0, i32 1}
    499 !1 = !{!"const", !2}
    500 !2 = !{!"tbaa root"}
    501