llvm/llvm/test/Transforms/InstCombine/lib-call-exit.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5
; RUN: opt < %s -passes=instcombine -S | FileCheck %s

declare void @exit(i32)
declare void @_Exit(i32)

define void @call_exit_0() {
; CHECK-LABEL: define void @call_exit_0() {
; CHECK-NEXT:    call void @exit(i32 0)
; CHECK-NEXT:    ret void
;
  call void @exit(i32 0)
  ret void
}

define void @call_exit_1() {
; CHECK-LABEL: define void @call_exit_1() {
; CHECK-NEXT:    call void @exit(i32 1) #[[ATTR0:[0-9]+]]
; CHECK-NEXT:    ret void
;
  call void @exit(i32 1)
  ret void
}

define void @call__Exit_m1() {
; CHECK-LABEL: define void @call__Exit_m1() {
; CHECK-NEXT:    call void @_Exit(i32 -1) #[[ATTR0]]
; CHECK-NEXT:    ret void
;
  call void @_Exit(i32 -1)
  ret void
}

define void @call__Exit_N(i32 %N) {
; CHECK-LABEL: define void @call__Exit_N(
; CHECK-SAME: i32 [[N:%.*]]) {
; CHECK-NEXT:    call void @_Exit(i32 [[N]])
; CHECK-NEXT:    ret void
;
  call void @_Exit(i32 %N)
  ret void
}

;.
; CHECK: attributes #[[ATTR0]] = { cold }
;.