[ArgPromo][Tests] Run update_test_checks on all ArgumentPromotion tests
Summary:
In preparation of D65531 as well as the reuse of these tests for the
Attributor, we modernize them and use the update_test_checks to simplify
updates.
This was done with the update_test_checks after D68819 and D68850.
Reviewers: hfinkel, vsk, dblaikie, davidxl, tejohnson, tstellar, echristo, chandlerc, efriedma, lebedev.ri
Subscribers: bollu, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68766
2019-10-10 15:10:51 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
|
2019-04-17 12:52:47 +08:00
|
|
|
; RUN: opt %s -argpromotion -S -o - | FileCheck %s
|
|
|
|
; RUN: opt %s -passes=argpromotion -S -o - | FileCheck %s
|
|
|
|
; PR14710
|
|
|
|
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
|
|
|
|
%pair = type { i32, i32 }
|
|
|
|
|
|
|
|
declare i8* @foo(%pair*)
|
|
|
|
|
|
|
|
define internal void @bar(%pair* byval %Data) {
|
[ArgPromo][Tests] Run update_test_checks on all ArgumentPromotion tests
Summary:
In preparation of D65531 as well as the reuse of these tests for the
Attributor, we modernize them and use the update_test_checks to simplify
updates.
This was done with the update_test_checks after D68819 and D68850.
Reviewers: hfinkel, vsk, dblaikie, davidxl, tejohnson, tstellar, echristo, chandlerc, efriedma, lebedev.ri
Subscribers: bollu, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68766
2019-10-10 15:10:51 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@bar
|
|
|
|
; CHECK-SAME: (i32 [[DATA_0:%.*]], i32 [[DATA_1:%.*]])
|
|
|
|
; CHECK-NEXT: [[DATA:%.*]] = alloca [[PAIR:%.*]]
|
|
|
|
; CHECK-NEXT: [[DOT0:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i32 0, i32 0
|
|
|
|
; CHECK-NEXT: store i32 [[DATA_0]], i32* [[DOT0]]
|
|
|
|
; CHECK-NEXT: [[DOT1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i32 0, i32 1
|
|
|
|
; CHECK-NEXT: store i32 [[DATA_1]], i32* [[DOT1]]
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = call i8* @foo(%pair* [[DATA]])
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-04-17 12:52:47 +08:00
|
|
|
tail call i8* @foo(%pair* %Data)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @zed(%pair* byval %Data) {
|
[ArgPromo][Tests] Run update_test_checks on all ArgumentPromotion tests
Summary:
In preparation of D65531 as well as the reuse of these tests for the
Attributor, we modernize them and use the update_test_checks to simplify
updates.
This was done with the update_test_checks after D68819 and D68850.
Reviewers: hfinkel, vsk, dblaikie, davidxl, tejohnson, tstellar, echristo, chandlerc, efriedma, lebedev.ri
Subscribers: bollu, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68766
2019-10-10 15:10:51 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@zed
|
|
|
|
; CHECK-SAME: (%pair* byval [[DATA:%.*]])
|
|
|
|
; CHECK-NEXT: [[DATA_0:%.*]] = getelementptr [[PAIR:%.*]], %pair* [[DATA]], i32 0, i32 0
|
|
|
|
; CHECK-NEXT: [[DATA_0_VAL:%.*]] = load i32, i32* [[DATA_0]]
|
|
|
|
; CHECK-NEXT: [[DATA_1:%.*]] = getelementptr [[PAIR]], %pair* [[DATA]], i32 0, i32 1
|
|
|
|
; CHECK-NEXT: [[DATA_1_VAL:%.*]] = load i32, i32* [[DATA_1]]
|
|
|
|
; CHECK-NEXT: call void @bar(i32 [[DATA_0_VAL]], i32 [[DATA_1_VAL]])
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-04-17 12:52:47 +08:00
|
|
|
call void @bar(%pair* byval %Data)
|
|
|
|
ret void
|
|
|
|
}
|