brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 9037129 Raw
33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 42; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=gfx1030 < %s | FileCheck -check-prefixes=GFX10 -enable-var-scope %s3; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=gfx1030 -global-isel -global-isel-abort=2 < %s | FileCheck -check-prefixes=GFX10  %s4; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX11 -enable-var-scope %s5; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=gfx1100 -global-isel -global-isel-abort=2 < %s | FileCheck -check-prefixes=GFX11 %s6; Test codegen with readfirstlane used by M0.7;8; M0 can only be written to by SALU instructions so we can't emit9; a v_readfirstlane_b32 m010 11define void @test_readfirstlane_m0(i32 %arg) {12; GFX10-LABEL: test_readfirstlane_m0:13; GFX10:       ; %bb.0:14; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)15; GFX10-NEXT:    v_readfirstlane_b32 s4, v016; GFX10-NEXT:    s_mov_b32 m0, s417; GFX10-NEXT:    s_sendmsg sendmsg(MSG_INTERRUPT)18; GFX10-NEXT:    s_waitcnt lgkmcnt(0)19; GFX10-NEXT:    s_setpc_b64 s[30:31]20;21; GFX11-LABEL: test_readfirstlane_m0:22; GFX11:       ; %bb.0:23; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)24; GFX11-NEXT:    v_readfirstlane_b32 s0, v025; GFX11-NEXT:    s_mov_b32 m0, s026; GFX11-NEXT:    s_sendmsg sendmsg(MSG_INTERRUPT)27; GFX11-NEXT:    s_waitcnt lgkmcnt(0)28; GFX11-NEXT:    s_setpc_b64 s[30:31]29  %1 = call i32 @llvm.amdgcn.readfirstlane.i32(i32 %arg)30  call void @llvm.amdgcn.s.sendmsg(i32 1, i32 %1)31  ret void32}33