1 ; RUN: opt -passes=deadargelim -S < %s | FileCheck %s
3 ; If caller is changed to pass in poison, noundef, dereferenceable and other
4 ; attributes that imply immediate undefined behavior must be deleted.
5 ; Other attributes like nonnull, which only imply poison, can be safely kept.
7 ; CHECK: define i64 @bar(ptr nonnull %0, i64 %1)
8 define i64 @bar(ptr nonnull dereferenceable(8) %0, i64 %1) {
14 define i64 @foo(ptr %p, i64 %v) {
15 ; CHECK: %retval = call i64 @bar(ptr nonnull poison, i64 %v)
16 %retval = call i64 @bar(ptr nonnull dereferenceable(8) %p, i64 %v)