1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck %s
3
4; SIPostRABundler used to incorrectly try to form a bundle containing
5; inline asm.
6
7define amdgpu_kernel void @no_bundle_asm_sideeffect() {
8; CHECK-LABEL: no_bundle_asm_sideeffect:
9; CHECK:       ; %bb.0:
10; CHECK-NEXT:    ;;#ASMSTART
11; CHECK-NEXT:    s_mov_b32 s0, 42
12; CHECK-NEXT:    ;;#ASMEND
13; CHECK-NEXT:    ;;#ASMSTART
14; CHECK-NEXT:    s_mov_b64 s[0:1], 42
15; CHECK-NEXT:    ;;#ASMEND
16; CHECK-NEXT:    s_endpgm
17  call void asm sideeffect "s_mov_b32 s0, $0", "i,~{s0}"(i32 42)
18  call void asm sideeffect "s_mov_b64 s[0:1], $0", "i,~{s[0:1]}"(i64 42)
19  ret void
20}
21
22define amdgpu_kernel void @no_bundle_asm() {
23; CHECK-LABEL: no_bundle_asm:
24; CHECK:       ; %bb.0:
25; CHECK-NEXT:    ;;#ASMSTART
26; CHECK-NEXT:    s_mov_b32 s0, 42
27; CHECK-NEXT:    ;;#ASMEND
28; CHECK-NEXT:    ;;#ASMSTART
29; CHECK-NEXT:    s_mov_b64 s[0:1], 42
30; CHECK-NEXT:    ;;#ASMEND
31; CHECK-NEXT:    s_endpgm
32  call void asm "s_mov_b32 s0, $0", "i,~{s0}"(i32 42)
33  call void asm "s_mov_b64 s[0:1], $0", "i,~{s[0:1]}"(i64 42)
34  ret void
35}
36