| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a --debug-counter=dagcombine=0 -start-before=si-annotate-control-flow %s -o - | FileCheck %s |
| |
| define amdgpu_kernel void @test(i32 %N, ptr addrspace(1) %p) { |
| ; CHECK-LABEL: test: |
| ; CHECK: ; %bb.0: ; %entry |
| ; CHECK-NEXT: v_and_b32_e32 v0, 0x3ff, v0 |
| ; CHECK-NEXT: v_cmp_gt_i32_e32 vcc, 1, v0 |
| ; CHECK-NEXT: s_and_saveexec_b64 s[0:1], vcc |
| ; CHECK-NEXT: s_endpgm |
| entry: |
| %id.x = tail call i32 @llvm.amdgcn.workitem.id.x() |
| %cmp2 = icmp slt i32 %id.x, 1 |
| br i1 %cmp2, label %if.then, label %exit |
| |
| if.then: |
| %idx.ext = zext i32 %N to i64 |
| %add.ptr = getelementptr i8, ptr addrspace(1) %p, i64 %idx.ext |
| ret void |
| |
| exit: |
| ret void |
| } |