[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 | FileCheck %s
|
|
|
|
; RUN: opt < %s -passes=argpromotion -S | FileCheck %s
|
|
|
|
|
|
|
|
; Don't promote around control flow.
|
|
|
|
define internal i32 @callee(i1 %C, i32* %P) {
|
[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 {{[^@]+}}@callee
|
|
|
|
; CHECK-SAME: (i1 [[C:%.*]], i32* [[P:%.*]])
|
|
|
|
; CHECK-NEXT: entry:
|
|
|
|
; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
|
|
|
|
; CHECK: T:
|
|
|
|
; CHECK-NEXT: ret i32 17
|
|
|
|
; CHECK: F:
|
|
|
|
; CHECK-NEXT: [[X:%.*]] = load i32, i32* [[P]]
|
|
|
|
; CHECK-NEXT: ret i32 [[X]]
|
|
|
|
;
|
2019-04-17 12:52:47 +08:00
|
|
|
entry:
|
|
|
|
br i1 %C, label %T, label %F
|
|
|
|
|
|
|
|
T:
|
|
|
|
ret i32 17
|
|
|
|
|
|
|
|
F:
|
|
|
|
%X = load i32, i32* %P
|
|
|
|
ret i32 %X
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @foo() {
|
[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 {{[^@]+}}@foo()
|
|
|
|
; CHECK-NEXT: entry:
|
|
|
|
; CHECK-NEXT: [[X:%.*]] = call i32 @callee(i1 true, i32* null)
|
|
|
|
; CHECK-NEXT: ret i32 [[X]]
|
|
|
|
;
|
2019-04-17 12:52:47 +08:00
|
|
|
entry:
|
|
|
|
%X = call i32 @callee(i1 true, i32* null)
|
|
|
|
ret i32 %X
|
|
|
|
}
|
|
|
|
|