mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
c60db04871
Fixes bug 46285
36 lines
1.1 KiB
LLVM
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
|
|
}
|