llvm/llvm/test/Transforms/InstCombine/nothrow.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals --version 2
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
; rdar://6880732
declare double @t1(i32) readonly willreturn

define void @t2() nounwind {
; CHECK: Function Attrs: nounwind
; CHECK-LABEL: define void @t2
; CHECK-SAME: () #[[ATTR1:[0-9]+]] {
; CHECK-NEXT:    ret void
;
  call double @t1(i32 42)  ;; dead call even though callee is not nothrow.
  ret void
}
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { willreturn memory(read) }
; CHECK: attributes #[[ATTR1]] = { nounwind }
;.