brintos

brintos / llvm-project-archived public Read only

0
0
Text · 623 B · cfc74cc Raw
19 lines · plain
1; RUN: opt -passes=deadargelim -S < %s | FileCheck %s2 3; If caller is changed to pass in poison, noundef, dereferenceable and other4; attributes that imply immediate undefined behavior must be deleted.5; Other attributes like nonnull, which only imply poison, can be safely kept.6 7; CHECK:   define i64 @bar(ptr nonnull %0, i64 %1)8define i64 @bar(ptr nonnull dereferenceable(8) %0, i64 %1) {9entry:10  %2 = add i64 %1, 811  ret i64 %212}13 14define 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)17  ret i64 %retval18}19