38 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 62; RUN: llc -mtriple=amdgcn -mcpu=gfx950 < %s | FileCheck %s3 4; Check that the copy from s[2:3] to v[0:1] occurs inside the loop, not after it.5 6define i64 @test_temporal_divergence(i32 %arg) #0 {7; CHECK-LABEL: test_temporal_divergence:8; CHECK: ; %bb.0: ; %entry9; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)10; CHECK-NEXT: v_add_u32_e32 v2, 1, v011; CHECK-NEXT: s_mov_b64 s[2:3], 012; CHECK-NEXT: s_mov_b64 s[0:1], 013; CHECK-NEXT: .LBB0_1: ; %loop14; CHECK-NEXT: ; =>This Inner Loop Header: Depth=115; CHECK-NEXT: v_add_u32_e32 v2, -1, v216; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 0, v217; CHECK-NEXT: v_mov_b64_e32 v[0:1], s[2:3]18; CHECK-NEXT: s_or_b64 s[0:1], vcc, s[0:1]19; CHECK-NEXT: s_mov_b64 s[2:3], 120; CHECK-NEXT: s_andn2_b64 exec, exec, s[0:1]21; CHECK-NEXT: s_cbranch_execnz .LBB0_122; CHECK-NEXT: ; %bb.2: ; %end23; CHECK-NEXT: s_or_b64 exec, exec, s[0:1]24; CHECK-NEXT: s_setpc_b64 s[30:31]25entry:26 br label %loop27 28loop:29 %i = phi i64 [ 1, %loop ], [ 0, %entry ]30 %count = phi i32 [ %inc, %loop ], [ 0, %entry ]31 %inc = add i32 %count, 132 %cond = icmp eq i32 %count, %arg33 br i1 %cond, label %end, label %loop34 35end:36 ret i64 %i37}38