31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S -passes=ipsccp < %s | FileCheck %s3 4; https://github.com/llvm/llvm-project/issues/596615 6define i32 @bar() {7; CHECK-LABEL: define i32 @bar() {8; CHECK-NEXT: [[ENTRY:.*:]]9; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo()10; CHECK-NEXT: ret i32 011;12entry:13 %call = call i32 @foo()14 ret i32 015}16 17define internal i32 @foo() {18; CHECK-LABEL: define internal i32 @foo() {19; CHECK-NEXT: [[ENTRY:.*:]]20; CHECK-NEXT: [[ARST:%.*]] = call ptr @llvm.ssa.copy.p0(ptr @foo)21; CHECK-NEXT: ret i32 022;23entry:24 %arst = call ptr @llvm.ssa.copy.p0(ptr @foo)25 ret i32 026}27 28declare ptr @llvm.ssa.copy.p0(ptr) #029 30attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }31