brintos

brintos / llvm-project-archived public Read only

0
0
Text · 905 B · b3e3055 Raw
32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; Check that function calls involving conversion from/to byval aren't transformed.3; RUN: opt < %s -passes=instcombine -S | FileCheck %s4 5%Foo = type { i64 }6define i64 @foo (ptr byval(%Foo) %foo) {7; CHECK-LABEL: @foo(8; CHECK-NEXT:    [[TMP1:%.*]] = load i64, ptr [[FOO:%.*]], align 49; CHECK-NEXT:    ret i64 [[TMP1]]10;11  %1 = load i64, ptr %foo, align 412  ret i64 %113}14 15define i64 @bar(i64 %0) {16; CHECK-LABEL: @bar(17; CHECK-NEXT:    [[TMP2:%.*]] = tail call i64 @foo(i64 [[TMP0:%.*]])18; CHECK-NEXT:    ret i64 [[TMP2]]19;20  %2 = tail call i64 @foo(i64 %0)21  ret i64 %222}23 24define i64 @qux(ptr byval(%Foo) %qux) {25; CHECK-LABEL: @qux(26; CHECK-NEXT:    [[TMP1:%.*]] = tail call i64 @bar(ptr nonnull byval([[FOO:%.*]]) [[QUX:%.*]])27; CHECK-NEXT:    ret i64 [[TMP1]]28;29  %1 = tail call i64 @bar(ptr byval(%Foo) %qux)30  ret i64 %131}32