summaryrefslogtreecommitdiff
path: root/test/Transforms/FunctionAttrs/noreturn.ll
blob: 990bea984dfe7b1a6fed7b745e4876f337e6b1bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: opt < %s -functionattrs -instcombine -S | FileCheck %s

define void @endless_loop() noreturn nounwind readnone ssp uwtable {
entry:
  br label %while.body

while.body:
  br label %while.body
}
;CHECK-LABEL: @main(
;CHECK: endless_loop
;CHECK: ret
define i32 @main() noreturn nounwind ssp uwtable {
entry:
  tail call void @endless_loop()
  unreachable
}