blob: 1a7aff43c25e76e924d38d0962f991d617d4008c [file]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt -passes=attributor -S < %s | FileCheck %s
; Regression test for #192012: a side-effect-free callbr is still a terminator
; and must not be queued for generic deletion after manifestation.
define i32 @callbr_is_not_deleted_as_dead_callbase() {
; CHECK-LABEL: define noundef i32 @callbr_is_not_deleted_as_dead_callbase(
; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: callbr void asm "", "!i"() #[[ATTR1:[0-9]+]]
; CHECK-NEXT: to label %[[COMMON_RET:.*]] [label %[[COMMON_RET]]]
; CHECK: [[COMMON_RET]]:
; CHECK-NEXT: ret i32 0
;
entry:
callbr void asm "", "!i"() #0
to label %common.ret [label %common.ret]
common.ret:
ret i32 0
}
attributes #0 = { nounwind memory(none) }