1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; Check that function calls involving conversion from/to byval aren't transformed.
3 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
6 define i64 @foo (ptr byval(%Foo) %foo) {
8 ; CHECK-NEXT: [[TMP1:%.*]] = load i64, ptr [[FOO:%.*]], align 4
9 ; CHECK-NEXT: ret i64 [[TMP1]]
11 %1 = load i64, ptr %foo, align 4
15 define i64 @bar(i64 %0) {
17 ; CHECK-NEXT: [[TMP2:%.*]] = tail call i64 @foo(i64 [[TMP0:%.*]])
18 ; CHECK-NEXT: ret i64 [[TMP2]]
20 %2 = tail call i64 @foo(i64 %0)
24 define i64 @qux(ptr byval(%Foo) %qux) {
26 ; CHECK-NEXT: [[TMP1:%.*]] = tail call i64 @bar(ptr nonnull byval([[FOO:%.*]]) [[QUX:%.*]])
27 ; CHECK-NEXT: ret i64 [[TMP1]]
29 %1 = tail call i64 @bar(ptr byval(%Foo) %qux)