CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
126 lines
3.7 KiB
YAML
126 lines
3.7 KiB
YAML
# RUN: llc -run-pass wasm-reg-stackify %s -o - | FileCheck %s
|
|
|
|
--- |
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
declare void @use(i32)
|
|
|
|
define void @sink_same_bb() {
|
|
unreachable
|
|
}
|
|
define void @clone_same_bb() {
|
|
unreachable
|
|
}
|
|
define void @clone_different_bb_0() {
|
|
unreachable
|
|
}
|
|
define void @clone_different_bb_1() {
|
|
unreachable
|
|
}
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!2, !3, !4}
|
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug)
|
|
!1 = !DIFile(filename: "test.c", directory: "")
|
|
!2 = !{i32 7, !"Dwarf Version", i32 5}
|
|
!3 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!4 = !{i32 1, !"wchar_size", i32 4}
|
|
!6 = distinct !DISubprogram(name: "sink_same_bb", scope: !1, file: !1, line: 1, type: !7, scopeLine: 1, unit: !0)
|
|
!7 = !DISubroutineType(types: !8)
|
|
!8 = !{null}
|
|
...
|
|
|
|
---
|
|
# Sinking within the same BB preserves the debug location.
|
|
# CHECK-LABEL: name: sink_same_bb
|
|
name: sink_same_bb
|
|
liveins:
|
|
- { reg: '$arguments' }
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $arguments
|
|
%0:i32 = CONST_I32 1, implicit-def $arguments, debug-location !DILocation(line:10, scope:!6)
|
|
NOP implicit-def $arguments
|
|
CALL @use, %0:i32, implicit-def $arguments
|
|
RETURN implicit-def $arguments
|
|
|
|
; CHECK: %0:i32 = CONST_I32 1, {{.*}}, debug-location !DILocation(line: 10
|
|
; CHECK-NEXT: CALL @use
|
|
...
|
|
|
|
---
|
|
# Cloning within the same BB preserves the debug location.
|
|
# CHECK-LABEL: name: clone_same_bb
|
|
name: clone_same_bb
|
|
liveins:
|
|
- { reg: '$arguments' }
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $arguments
|
|
%0:i32 = CONST_I32 1, implicit-def $arguments, debug-location !DILocation(line:10, scope:!6)
|
|
NOP implicit-def $arguments
|
|
CALL @use, %0:i32, implicit-def $arguments
|
|
CALL @use, %0:i32, implicit-def $arguments
|
|
RETURN implicit-def $arguments
|
|
|
|
; CHECK: CALL @use
|
|
; CHECK-NEXT: %1:i32 = CONST_I32 1, {{.*}}, debug-location !DILocation(line: 10
|
|
; CHECK-NEXT: CALL @use
|
|
...
|
|
|
|
---
|
|
# Cloning to a different BB preserves the debug location in this case because
|
|
# the destination BB has an instruction that has the same debug location
|
|
# (test.c:10).
|
|
# CHECK-LABEL: name: clone_different_bb_0
|
|
name: clone_different_bb_0
|
|
liveins:
|
|
- { reg: '$arguments' }
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
successors: %bb.1
|
|
liveins: $arguments
|
|
%0:i32 = CONST_I32 1, implicit-def $arguments, debug-location !DILocation(line:10, scope:!6)
|
|
BR %bb.1, implicit-def $arguments
|
|
|
|
bb.1:
|
|
; predecessors: %bb.0
|
|
CALL @use, %0:i32, implicit-def $arguments, debug-location !DILocation(line:10, scope:!6)
|
|
RETURN implicit-def $arguments
|
|
|
|
; CHECK: bb.1:
|
|
; CHECK: %1:i32 = CONST_I32 1, {{.*}}, debug-location !DILocation(line: 10
|
|
; CHECK-NEXT: CALL @use, %1, {{.*}}, debug-location !DILocation(line: 10
|
|
...
|
|
|
|
---
|
|
# Cloning to a different BB does NOT preserve the debug location in this case
|
|
# because the destination BB doesn't have an instruction that has the same debug
|
|
# location (It has test.c:20 but not test.c:10).
|
|
# CHECK-LABEL: name: clone_different_bb_1
|
|
name: clone_different_bb_1
|
|
liveins:
|
|
- { reg: '$arguments' }
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
successors: %bb.1
|
|
liveins: $arguments
|
|
%0:i32 = CONST_I32 1, implicit-def $arguments, debug-location !DILocation(line:10, scope:!6)
|
|
BR %bb.1, implicit-def $arguments
|
|
|
|
bb.1:
|
|
; predecessors: %bb.0
|
|
CALL @use, %0:i32, implicit-def $arguments, debug-location !DILocation(line:20, scope:!6)
|
|
RETURN implicit-def $arguments
|
|
|
|
; CHECK: bb.1:
|
|
; CHECK: %1:i32 = CONST_I32 1
|
|
; CHECK-NOT: %1:i32 = CONST_I32 1, {{.*}}, debug-location !DILocation(line: 10
|
|
; CHECK-NEXT: CALL @use, %1, {{.*}}, debug-location !DILocation(line: 20
|
|
...
|