brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.1 KiB · 4c2967a Raw
216 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck %s3 4@_RSENC_gDcd_______________________________ = external protected addrspace(1) externally_initialized global [4096 x i8], align 165 6define protected amdgpu_kernel void @_RSENC_PRInit__________________________________(i1 %c0) local_unnamed_addr #0 {7; CHECK-LABEL: _RSENC_PRInit__________________________________:8; CHECK:       ; %bb.0: ; %entry9; CHECK-NEXT:    s_add_u32 flat_scratch_lo, s12, s1710; CHECK-NEXT:    s_addc_u32 flat_scratch_hi, s13, 011; CHECK-NEXT:    flat_load_dword v0, v[0:1]12; CHECK-NEXT:    s_add_u32 s0, s0, s1713; CHECK-NEXT:    s_mov_b32 s4, 0xf19b314; CHECK-NEXT:    s_addc_u32 s1, s1, 015; CHECK-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)16; CHECK-NEXT:    v_lshl_add_u32 v0, v0, 1, v017; CHECK-NEXT:    v_cmp_ne_u32_e32 vcc, s4, v018; CHECK-NEXT:    s_and_saveexec_b64 s[4:5], vcc19; CHECK-NEXT:    s_cbranch_execz .LBB0_1320; CHECK-NEXT:  ; %bb.1: ; %if.end1521; CHECK-NEXT:    s_load_dword s4, s[8:9], 0x022; CHECK-NEXT:    s_waitcnt lgkmcnt(0)23; CHECK-NEXT:    s_bitcmp1_b32 s4, 024; CHECK-NEXT:    s_cselect_b64 s[4:5], -1, 025; CHECK-NEXT:    s_and_b64 vcc, exec, s[4:5]26; CHECK-NEXT:    s_cbranch_vccnz .LBB0_1327; CHECK-NEXT:  ; %bb.2: ; %lor.lhs.false1728; CHECK-NEXT:    s_cmp_eq_u32 s4, 029; CHECK-NEXT:  .LBB0_3: ; %while.cond.i30; CHECK-NEXT:    ; =>This Inner Loop Header: Depth=131; CHECK-NEXT:    s_cbranch_scc1 .LBB0_332; CHECK-NEXT:  ; %bb.4: ; %if.end6033; CHECK-NEXT:    s_cbranch_execz .LBB0_1234; CHECK-NEXT:  ; %bb.5: ; %if.end5.i35; CHECK-NEXT:    s_cbranch_scc0 .LBB0_1236; CHECK-NEXT:  ; %bb.6: ; %if.end5.i31437; CHECK-NEXT:    s_cbranch_scc0 .LBB0_1238; CHECK-NEXT:  ; %bb.7: ; %if.end5.i33839; CHECK-NEXT:    s_cbranch_scc0 .LBB0_1240; CHECK-NEXT:  ; %bb.8: ; %if.end5.i36241; CHECK-NEXT:    v_mov_b32_e32 v0, 042; CHECK-NEXT:    s_getpc_b64 s[4:5]43; CHECK-NEXT:    s_add_u32 s4, s4, _RSENC_gDcd_______________________________@rel32@lo+115744; CHECK-NEXT:    s_addc_u32 s5, s5, _RSENC_gDcd_______________________________@rel32@hi+116545; CHECK-NEXT:    global_load_ubyte v1, v0, s[4:5]46; CHECK-NEXT:    s_nop 047; CHECK-NEXT:    buffer_store_byte v0, v0, s[0:3], 0 offen48; CHECK-NEXT:    s_waitcnt vmcnt(1)49; CHECK-NEXT:    buffer_store_byte v1, off, s[0:3], 0 offset:25750; CHECK-NEXT:    s_cbranch_scc0 .LBB0_1251; CHECK-NEXT:  ; %bb.9: ; %if.end5.i40052; CHECK-NEXT:    flat_load_ubyte v0, v[0:1]53; CHECK-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)54; CHECK-NEXT:    v_cmp_eq_u16_e32 vcc, 0, v055; CHECK-NEXT:    s_and_b64 exec, exec, vcc56; CHECK-NEXT:    s_cbranch_execz .LBB0_1257; CHECK-NEXT:  ; %bb.10: ; %if.then40458; CHECK-NEXT:    s_movk_i32 s4, 0x100059; CHECK-NEXT:  .LBB0_11: ; %for.body56460; CHECK-NEXT:    ; =>This Inner Loop Header: Depth=161; CHECK-NEXT:    s_sub_i32 s4, s4, 3262; CHECK-NEXT:    s_cmp_lg_u32 s4, 063; CHECK-NEXT:    s_cbranch_scc1 .LBB0_1164; CHECK-NEXT:  .LBB0_12: ; %UnifiedUnreachableBlock65; CHECK-NEXT:    ; divergent unreachable66; CHECK-NEXT:  .LBB0_13: ; %UnifiedReturnBlock67; CHECK-NEXT:    s_endpgm68entry:69  %runtimeVersionCopy = alloca [128 x i8], align 16, addrspace(5)70  %licenseVersionCopy = alloca [128 x i8], align 16, addrspace(5)71  %pD10 = alloca [128 x i8], align 16, addrspace(5)72  br label %if.end73 74if.end:                                           ; preds = %entry75  %0 = load i32, ptr poison, align 476  %mul = mul i32 %0, 377  %cmp13 = icmp eq i32 %mul, 98961978  br i1 %cmp13, label %cleanup.cont, label %if.end1579 80if.end15:                                         ; preds = %if.end81  br i1 %c0, label %cleanup.cont, label %lor.lhs.false1782 83lor.lhs.false17:                                  ; preds = %if.end1584  br label %while.cond.i85 86while.cond.i:                                     ; preds = %while.cond.i, %lor.lhs.false1787  %undef0 = freeze i32 poison88  switch i32 %undef0, label %if.end60 [89    i32 0, label %while.cond.i90    i32 3, label %if.end60.loopexit85791  ]92 93if.end60.loopexit857:                             ; preds = %while.cond.i94  br label %if.end6095 96if.end60:                                         ; preds = %if.end60.loopexit857, %while.cond.i97  %1 = load i8, ptr addrspace(1) getelementptr inbounds ([4096 x i8], ptr addrspace(1) @_RSENC_gDcd_______________________________, i64 0, i64 655), align 198  %arrayidx144260.5 = getelementptr inbounds [128 x i8], ptr addrspace(5) %runtimeVersionCopy, i32 0, i32 599  %arrayidx156258.5 = getelementptr inbounds [128 x i8], ptr addrspace(5) %licenseVersionCopy, i32 0, i32 5100  switch i8 0, label %if.end5.i [101    i8 45, label %if.then.i102    i8 43, label %if.then3.i103  ]104 105if.then.i:                                        ; preds = %if.end60106  unreachable107 108if.then3.i:                                       ; preds = %if.end60109  br label %if.end5.i110 111if.end5.i:                                        ; preds = %if.then3.i, %if.end60112  %pS.addr.0.i = phi ptr addrspace(5) [ poison, %if.then3.i ], [ %runtimeVersionCopy, %if.end60 ]113  %2 = load i8, ptr addrspace(5) %pS.addr.0.i, align 1114  %conv612.i = sext i8 %2 to i32115  %sub13.i = add nsw i32 %conv612.i, -48116  %cmp714.i = icmp ugt i32 %sub13.i, 9117  switch i8 poison, label %if.end5.i314 [118    i8 45, label %if.then.i306119    i8 43, label %if.then3.i308120  ]121 122if.then.i306:                                     ; preds = %if.end5.i123  unreachable124 125if.then3.i308:                                    ; preds = %if.end5.i126  br label %if.end5.i314127 128if.end5.i314:                                     ; preds = %if.then3.i308, %if.end5.i129  %pS.addr.0.i309 = phi ptr addrspace(5) [ poison, %if.then3.i308 ], [ %licenseVersionCopy, %if.end5.i ]130  %3 = load i8, ptr addrspace(5) %pS.addr.0.i309, align 1131  %conv612.i311 = sext i8 %3 to i32132  %sub13.i312 = add nsw i32 %conv612.i311, -48133  %cmp714.i313 = icmp ugt i32 %sub13.i312, 9134  switch i8 poison, label %if.end5.i338 [135    i8 45, label %if.then.i330136    i8 43, label %if.then3.i332137  ]138 139if.then.i330:                                     ; preds = %if.end5.i314140  unreachable141 142if.then3.i332:                                    ; preds = %if.end5.i314143  br label %if.end5.i338144 145if.end5.i338:                                     ; preds = %if.then3.i332, %if.end5.i314146  %pS.addr.0.i333 = phi ptr addrspace(5) [ poison, %if.then3.i332 ], [ %arrayidx144260.5, %if.end5.i314 ]147  %4 = load i8, ptr addrspace(5) %pS.addr.0.i333, align 1148  %conv612.i335 = sext i8 %4 to i32149  %sub13.i336 = add nsw i32 %conv612.i335, -48150  %cmp714.i337 = icmp ugt i32 %sub13.i336, 9151  switch i8 poison, label %if.end5.i362 [152    i8 45, label %if.then.i354153    i8 43, label %if.then3.i356154  ]155 156if.then.i354:                                     ; preds = %if.end5.i338157  unreachable158 159if.then3.i356:                                    ; preds = %if.end5.i338160  br label %if.end5.i362161 162if.end5.i362:                                     ; preds = %if.then3.i356, %if.end5.i338163  %pS.addr.0.i357 = phi ptr addrspace(5) [ poison, %if.then3.i356 ], [ %arrayidx156258.5, %if.end5.i338 ]164  %5 = load i8, ptr addrspace(5) %pS.addr.0.i357, align 1165  %conv612.i359 = sext i8 %5 to i32166  %sub13.i360 = add nsw i32 %conv612.i359, -48167  %cmp714.i361 = icmp ugt i32 %sub13.i360, 9168  store i8 0, ptr addrspace(5) poison, align 16169  %6 = load i8, ptr addrspace(1) getelementptr inbounds ([4096 x i8], ptr addrspace(1) @_RSENC_gDcd_______________________________, i64 0, i64 1153), align 1170  %arrayidx232250.1 = getelementptr inbounds [128 x i8], ptr addrspace(5) %pD10, i32 0, i32 1171  store i8 %6, ptr addrspace(5) %arrayidx232250.1, align 1172  switch i8 poison, label %if.end5.i400 [173    i8 45, label %if.then.i392174    i8 43, label %if.then3.i394175  ]176 177if.then.i392:                                     ; preds = %if.end5.i362178  unreachable179 180if.then3.i394:                                    ; preds = %if.end5.i362181  br label %if.end5.i400182 183if.end5.i400:                                     ; preds = %if.then3.i394, %if.end5.i362184  %pS.addr.0.i395 = phi ptr addrspace(5) [ %arrayidx232250.1, %if.then3.i394 ], [ poison, %if.end5.i362 ]185  %7 = load i8, ptr addrspace(5) %pS.addr.0.i395, align 1186  %conv612.i397 = sext i8 %7 to i32187  %sub13.i398 = add nsw i32 %conv612.i397, -48188  %cmp714.i399 = icmp ugt i32 %sub13.i398, 9189  %8 = load i8, ptr poison, align 1190  %cmp9.not.i500 = icmp eq i8 0, %8191  br label %land.lhs.true402.critedge192 193land.lhs.true402.critedge:                        ; preds = %if.end5.i400194  br i1 %cmp9.not.i500, label %if.then404, label %if.else407195 196if.then404:                                       ; preds = %land.lhs.true402.critedge197  br label %for.body564198 199if.else407:                                       ; preds = %land.lhs.true402.critedge200  br label %if.end570201 202for.body564:                                      ; preds = %for.body564, %if.then404203  %i560.0801 = phi i32 [ 0, %if.then404 ], [ %inc568.31, %for.body564 ]204  %inc568.31 = add nuw nsw i32 %i560.0801, 32205  %exitcond839.not.31 = icmp eq i32 %inc568.31, 4096206  br i1 %exitcond839.not.31, label %if.end570, label %for.body564207 208if.end570:                                        ; preds = %for.body564, %if.else407209  unreachable210 211cleanup.cont:                                     ; preds = %if.end15, %if.end212  ret void213}214 215attributes #0 = { "uniform-work-group-size"="true" }216