1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/AMDGPU/no-bundle-asm.ll
Matt Arsenault c60db04871 AMDGPU: Do not bundle inline asm
Fixes bug 46285
2020-06-14 13:24:50 -04:00

36 lines
1.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck %s
; SIPostRABundler used to incorrectly try to form a bundle containing
; inline asm.
define amdgpu_kernel void @no_bundle_asm_sideeffect() {
; CHECK-LABEL: no_bundle_asm_sideeffect:
; CHECK: ; %bb.0:
; CHECK-NEXT: ;;#ASMSTART
; CHECK-NEXT: s_mov_b32 s0, 42
; CHECK-NEXT: ;;#ASMEND
; CHECK-NEXT: ;;#ASMSTART
; CHECK-NEXT: s_mov_b64 s[0:1], 42
; CHECK-NEXT: ;;#ASMEND
; CHECK-NEXT: s_endpgm
call void asm sideeffect "s_mov_b32 s0, $0", "i,~{s0}"(i32 42)
call void asm sideeffect "s_mov_b64 s[0:1], $0", "i,~{s[0:1]}"(i64 42)
ret void
}
define amdgpu_kernel void @no_bundle_asm() {
; CHECK-LABEL: no_bundle_asm:
; CHECK: ; %bb.0:
; CHECK-NEXT: ;;#ASMSTART
; CHECK-NEXT: s_mov_b32 s0, 42
; CHECK-NEXT: ;;#ASMEND
; CHECK-NEXT: ;;#ASMSTART
; CHECK-NEXT: s_mov_b64 s[0:1], 42
; CHECK-NEXT: ;;#ASMEND
; CHECK-NEXT: s_endpgm
call void asm "s_mov_b32 s0, $0", "i,~{s0}"(i32 42)
call void asm "s_mov_b64 s[0:1], $0", "i,~{s[0:1]}"(i64 42)
ret void
}