brintos

brintos / llvm-project-archived public Read only

0
0
Text · 892 B · 1116647 Raw
28 lines · plain
1; Make sure we don't break on non-callee uses of funtions with a2; non-void return type.3 4; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=instructions-to-return --test FileCheck --test-arg --check-prefix=INTERESTING --test-arg %s --test-arg --input-file %s -o %t5; RUN: FileCheck --check-prefix=RESULT %s < %t6 7; INTERESTING-LABEL: @interesting(8; INTERESTING: %inttoptr = inttoptr i649 10; RESULT-LABEL: define ptr @interesting(i64 %arg) {11; RESULT-NEXT: %inttoptr = inttoptr i64 %arg to ptr12; RESULT-NEXT:  ret ptr %inttoptr13define void @interesting(i64 %arg) {14  %inttoptr = inttoptr i64 %arg to ptr15  %load = load i32, ptr %inttoptr16  ret void17}18 19declare i32 @func(ptr)20 21; RESULT-LABEL: define i32 @caller() {22; RESULT-NEXT: %call = call i32 @func(ptr @interesting)23; RESULT-NEXT: ret i32 %call24define void @caller() {25  %call = call i32 @func(ptr @interesting)26  ret void27}28