2020-07-20 03:55:43 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
|
2020-07-29 08:57:21 +08:00
|
|
|
; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
|
2020-05-12 01:22:41 +08:00
|
|
|
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
|
2020-07-29 08:57:21 +08:00
|
|
|
; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
|
2020-04-18 10:09:16 +08:00
|
|
|
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
|
2019-07-28 15:04:01 +08:00
|
|
|
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
|
|
|
|
; Test cases specifically designed for "align" attribute.
|
|
|
|
; We use FIXME's to indicate problems and missing attributes.
|
|
|
|
|
|
|
|
|
|
|
|
; TEST 1
|
2019-08-03 22:28:34 +08:00
|
|
|
define i32* @test1(i32* align 8 %0) #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test1
|
|
|
|
; IS__TUNIT____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: ret i32* [[TMP0]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test1
|
|
|
|
; IS__CGSCC____-SAME: (i32* nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: ret i32* [[TMP0]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
ret i32* %0
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 2
|
2019-08-03 22:28:34 +08:00
|
|
|
define i32* @test2(i32* %0) #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test2
|
|
|
|
; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: ret i32* [[TMP0]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test2
|
|
|
|
; IS__CGSCC____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: ret i32* [[TMP0]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
ret i32* %0
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 3
|
2019-08-03 22:28:34 +08:00
|
|
|
define i32* @test3(i32* align 8 %0, i32* align 4 %1, i1 %2) #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test3
|
|
|
|
; IS__TUNIT____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]]
|
|
|
|
; IS__TUNIT____-NEXT: ret i32* [[RET]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test3
|
|
|
|
; IS__CGSCC____-SAME: (i32* nofree readnone align 8 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 4 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]]
|
|
|
|
; IS__CGSCC____-NEXT: ret i32* [[RET]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ret = select i1 %2, i32* %0, i32* %1
|
|
|
|
ret i32* %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 4
|
2019-08-03 22:28:34 +08:00
|
|
|
define i32* @test4(i32* align 32 %0, i32* align 32 %1, i1 %2) #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test4
|
|
|
|
; IS__TUNIT____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]]
|
|
|
|
; IS__TUNIT____-NEXT: ret i32* [[RET]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test4
|
|
|
|
; IS__CGSCC____-SAME: (i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP0:%.*]], i32* nofree readnone align 32 "no-capture-maybe-returned" [[TMP1:%.*]], i1 [[TMP2:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[RET:%.*]] = select i1 [[TMP2]], i32* [[TMP0]], i32* [[TMP1]]
|
|
|
|
; IS__CGSCC____-NEXT: ret i32* [[RET]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ret = select i1 %2, i32* %0, i32* %1
|
|
|
|
ret i32* %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 5
|
|
|
|
declare i32* @unknown()
|
|
|
|
declare align 8 i32* @align8()
|
|
|
|
|
|
|
|
|
|
|
|
define i32* @test5_1() {
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test5_1()
|
|
|
|
; CHECK-NEXT: [[RET:%.*]] = tail call align 8 i32* @unknown()
|
|
|
|
; CHECK-NEXT: ret i32* [[RET]]
|
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ret = tail call align 8 i32* @unknown()
|
|
|
|
ret i32* %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32* @test5_2() {
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test5_2()
|
|
|
|
; CHECK-NEXT: [[RET:%.*]] = tail call align 8 i32* @align8()
|
|
|
|
; CHECK-NEXT: ret i32* [[RET]]
|
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ret = tail call i32* @align8()
|
|
|
|
ret i32* %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 6
|
|
|
|
; SCC
|
|
|
|
define i32* @test6_1() #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable
|
|
|
|
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1()
|
|
|
|
; NOT_CGSCC_NPM-NEXT: unreachable
|
|
|
|
;
|
|
|
|
; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_1()
|
|
|
|
; IS__CGSCC_NPM-NEXT: unreachable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ret = tail call i32* @test6_2()
|
|
|
|
ret i32* %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32* @test6_2() #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; NOT_CGSCC_NPM: Function Attrs: nofree noinline noreturn nosync nounwind readnone uwtable
|
|
|
|
; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2()
|
|
|
|
; NOT_CGSCC_NPM-NEXT: unreachable
|
|
|
|
;
|
|
|
|
; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse noreturn nosync nounwind readnone uwtable willreturn
|
|
|
|
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test6_2()
|
|
|
|
; IS__CGSCC_NPM-NEXT: unreachable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ret = tail call i32* @test6_1()
|
|
|
|
ret i32* %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
; char a1 __attribute__((aligned(8)));
|
|
|
|
; char a2 __attribute__((aligned(16)));
|
|
|
|
;
|
|
|
|
; char* f1(char* a ){
|
|
|
|
; return a?a:f2(&a1);
|
|
|
|
; }
|
|
|
|
; char* f2(char* a){
|
|
|
|
; return a?f1(a):f3(&a2);
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; char* f3(char* a){
|
|
|
|
; return a?&a1: f1(&a2);
|
|
|
|
; }
|
|
|
|
|
|
|
|
@a1 = common global i8 0, align 8
|
|
|
|
@a2 = common global i8 0, align 16
|
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone ssp uwtable
|
2019-08-03 22:28:34 +08:00
|
|
|
define internal i8* @f1(i8* readnone %0) local_unnamed_addr #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@f1
|
|
|
|
; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
|
|
|
|
; IS__TUNIT____: 3:
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP4:%.*]] = tail call align 8 i8* @f2()
|
|
|
|
; IS__TUNIT____-NEXT: br label [[TMP5]]
|
|
|
|
; IS__TUNIT____: 5:
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
|
|
|
|
; IS__TUNIT____-NEXT: ret i8* [[TMP6]]
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
|
|
|
|
; IS__CGSCC____-SAME: (i8* nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
|
|
|
|
; IS__CGSCC____: 3:
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call align 8 i8* @f2()
|
|
|
|
; IS__CGSCC____-NEXT: br label [[TMP5]]
|
|
|
|
; IS__CGSCC____: 5:
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
|
|
|
|
; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
|
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%2 = icmp eq i8* %0, null
|
|
|
|
br i1 %2, label %3, label %5
|
|
|
|
|
|
|
|
; <label>:3: ; preds = %1
|
|
|
|
%4 = tail call i8* @f2(i8* nonnull @a1)
|
2019-08-30 23:22:28 +08:00
|
|
|
%l = load i8, i8* %4
|
2019-07-28 15:04:01 +08:00
|
|
|
br label %5
|
|
|
|
|
|
|
|
; <label>:5: ; preds = %1, %3
|
|
|
|
%6 = phi i8* [ %4, %3 ], [ %0, %1 ]
|
|
|
|
ret i8* %6
|
|
|
|
}
|
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone ssp uwtable
|
2019-08-03 22:28:34 +08:00
|
|
|
define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@f2() local_unnamed_addr
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i8* @a1, null
|
|
|
|
; CHECK-NEXT: br i1 [[TMP1]], label [[TMP4:%.*]], label [[TMP2:%.*]]
|
|
|
|
; CHECK: 2:
|
|
|
|
; CHECK-NEXT: [[TMP3:%.*]] = tail call i8* @f1(i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1)
|
|
|
|
; CHECK-NEXT: br label [[TMP6:%.*]]
|
|
|
|
; CHECK: 4:
|
|
|
|
; CHECK-NEXT: [[TMP5:%.*]] = tail call i8* @f3()
|
|
|
|
; CHECK-NEXT: br label [[TMP6]]
|
|
|
|
; CHECK: 6:
|
|
|
|
; CHECK-NEXT: [[TMP7:%.*]] = phi i8* [ [[TMP3]], [[TMP2]] ], [ [[TMP5]], [[TMP4]] ]
|
|
|
|
; CHECK-NEXT: ret i8* [[TMP7]]
|
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%2 = icmp eq i8* %0, null
|
|
|
|
br i1 %2, label %5, label %3
|
|
|
|
|
|
|
|
; <label>:3: ; preds = %1
|
|
|
|
|
|
|
|
%4 = tail call i8* @f1(i8* nonnull %0)
|
|
|
|
br label %7
|
|
|
|
|
|
|
|
; <label>:5: ; preds = %1
|
|
|
|
%6 = tail call i8* @f3(i8* nonnull @a2)
|
|
|
|
br label %7
|
|
|
|
|
|
|
|
; <label>:7: ; preds = %5, %3
|
|
|
|
%8 = phi i8* [ %4, %3 ], [ %6, %5 ]
|
|
|
|
ret i8* %8
|
|
|
|
}
|
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone ssp uwtable
|
2019-08-03 22:28:34 +08:00
|
|
|
define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nofree noinline nosync nounwind readnone uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@f3() local_unnamed_addr
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i8* @a2, null
|
|
|
|
; CHECK-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP4:%.*]]
|
|
|
|
; CHECK: 2:
|
2020-05-04 08:08:30 +08:00
|
|
|
; CHECK-NEXT: [[TMP3:%.*]] = tail call i8* @f1(i8* noalias nofree nonnull readnone align 16 dereferenceable(1) "no-capture-maybe-returned" @a2)
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-NEXT: br label [[TMP4]]
|
|
|
|
; CHECK: 4:
|
|
|
|
; CHECK-NEXT: [[TMP5:%.*]] = phi i8* [ [[TMP3]], [[TMP2]] ], [ @a1, [[TMP0:%.*]] ]
|
|
|
|
; CHECK-NEXT: ret i8* [[TMP5]]
|
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%2 = icmp eq i8* %0, null
|
|
|
|
br i1 %2, label %3, label %5
|
|
|
|
|
|
|
|
; <label>:3: ; preds = %1
|
|
|
|
%4 = tail call i8* @f1(i8* nonnull @a2)
|
|
|
|
br label %5
|
|
|
|
|
|
|
|
; <label>:5: ; preds = %1, %3
|
|
|
|
%6 = phi i8* [ %4, %3 ], [ @a1, %1 ]
|
|
|
|
ret i8* %6
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 7
|
|
|
|
; Better than IR information
|
2020-01-12 14:34:38 +08:00
|
|
|
define align 4 i8* @test7() #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test7()
|
2020-05-04 08:08:30 +08:00
|
|
|
; IS__TUNIT____-NEXT: [[C:%.*]] = tail call i8* @f1(i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1)
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__TUNIT____-NEXT: ret i8* [[C]]
|
2019-11-27 14:30:12 +08:00
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind readnone uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test7()
|
|
|
|
; IS__CGSCC____-NEXT: [[C:%.*]] = tail call nonnull align 8 dereferenceable(1) i8* @f1(i8* noalias nofree nonnull readnone align 8 dereferenceable(1) @a1)
|
|
|
|
; IS__CGSCC____-NEXT: ret i8* [[C]]
|
2019-10-13 16:08:18 +08:00
|
|
|
;
|
2020-01-12 14:34:38 +08:00
|
|
|
%c = tail call i8* @f1(i8* align 8 dereferenceable(1) @a1)
|
|
|
|
ret i8* %c
|
2019-07-28 15:04:01 +08:00
|
|
|
}
|
|
|
|
|
2019-10-13 16:08:18 +08:00
|
|
|
; TEST 7b
|
|
|
|
; Function Attrs: nounwind readnone ssp uwtable
|
|
|
|
define internal i8* @f1b(i8* readnone %0) local_unnamed_addr #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@f1b
|
|
|
|
; IS__TUNIT____-SAME: (i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
|
|
|
|
; IS__TUNIT____: 3:
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP4:%.*]] = tail call align 8 i8* @f2b()
|
|
|
|
; IS__TUNIT____-NEXT: [[L:%.*]] = load i8, i8* [[TMP4]], align 8
|
|
|
|
; IS__TUNIT____-NEXT: store i8 [[L]], i8* @a1, align 8
|
|
|
|
; IS__TUNIT____-NEXT: br label [[TMP5]]
|
|
|
|
; IS__TUNIT____: 5:
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
|
|
|
|
; IS__TUNIT____-NEXT: ret i8* [[TMP6]]
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@f1b
|
|
|
|
; IS__CGSCC____-SAME: (i8* nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
|
|
|
|
; IS__CGSCC____: 3:
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP4:%.*]] = tail call align 8 i8* @f2b()
|
|
|
|
; IS__CGSCC____-NEXT: [[L:%.*]] = load i8, i8* [[TMP4]], align 8
|
|
|
|
; IS__CGSCC____-NEXT: store i8 [[L]], i8* @a1, align 8
|
|
|
|
; IS__CGSCC____-NEXT: br label [[TMP5]]
|
|
|
|
; IS__CGSCC____: 5:
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP0]], [[TMP1:%.*]] ]
|
|
|
|
; IS__CGSCC____-NEXT: ret i8* [[TMP6]]
|
2019-10-13 16:08:18 +08:00
|
|
|
;
|
|
|
|
%2 = icmp eq i8* %0, null
|
|
|
|
br i1 %2, label %3, label %5
|
|
|
|
|
|
|
|
; <label>:3: ; preds = %1
|
|
|
|
%4 = tail call i8* @f2b(i8* nonnull @a1)
|
|
|
|
%l = load i8, i8* %4
|
|
|
|
store i8 %l, i8* @a1
|
|
|
|
br label %5
|
|
|
|
|
|
|
|
; <label>:5: ; preds = %1, %3
|
|
|
|
%6 = phi i8* [ %4, %3 ], [ %0, %1 ]
|
|
|
|
ret i8* %6
|
|
|
|
}
|
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone ssp uwtable
|
|
|
|
define internal i8* @f2b(i8* readnone %0) local_unnamed_addr #0 {
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nofree noinline nosync nounwind uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@f2b() local_unnamed_addr
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i8* @a1, null
|
|
|
|
; CHECK-NEXT: br i1 [[TMP1]], label [[TMP4:%.*]], label [[TMP2:%.*]]
|
|
|
|
; CHECK: 2:
|
|
|
|
; CHECK-NEXT: [[TMP3:%.*]] = tail call i8* @f1b(i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1)
|
|
|
|
; CHECK-NEXT: br label [[TMP6:%.*]]
|
|
|
|
; CHECK: 4:
|
|
|
|
; CHECK-NEXT: [[TMP5:%.*]] = tail call i8* @f3b()
|
|
|
|
; CHECK-NEXT: br label [[TMP6]]
|
|
|
|
; CHECK: 6:
|
|
|
|
; CHECK-NEXT: [[TMP7:%.*]] = phi i8* [ [[TMP3]], [[TMP2]] ], [ [[TMP5]], [[TMP4]] ]
|
|
|
|
; CHECK-NEXT: ret i8* [[TMP7]]
|
2019-10-13 16:08:18 +08:00
|
|
|
;
|
|
|
|
%2 = icmp eq i8* %0, null
|
|
|
|
br i1 %2, label %5, label %3
|
|
|
|
|
|
|
|
; <label>:3: ; preds = %1
|
|
|
|
|
|
|
|
%4 = tail call i8* @f1b(i8* nonnull %0)
|
|
|
|
br label %7
|
|
|
|
|
|
|
|
; <label>:5: ; preds = %1
|
|
|
|
%6 = tail call i8* @f3b(i8* nonnull @a2)
|
|
|
|
br label %7
|
|
|
|
|
|
|
|
; <label>:7: ; preds = %5, %3
|
|
|
|
%8 = phi i8* [ %4, %3 ], [ %6, %5 ]
|
|
|
|
ret i8* %8
|
|
|
|
}
|
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone ssp uwtable
|
|
|
|
define internal i8* @f3b(i8* readnone %0) local_unnamed_addr #0 {
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nofree noinline nosync nounwind uwtable
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@f3b() local_unnamed_addr
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i8* @a2, null
|
|
|
|
; CHECK-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP4:%.*]]
|
|
|
|
; CHECK: 2:
|
2020-05-04 08:08:30 +08:00
|
|
|
; CHECK-NEXT: [[TMP3:%.*]] = tail call i8* @f1b(i8* noalias nofree nonnull readnone align 16 dereferenceable(1) "no-capture-maybe-returned" @a2)
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-NEXT: br label [[TMP4]]
|
|
|
|
; CHECK: 4:
|
|
|
|
; CHECK-NEXT: [[TMP5:%.*]] = phi i8* [ [[TMP3]], [[TMP2]] ], [ @a1, [[TMP0:%.*]] ]
|
|
|
|
; CHECK-NEXT: ret i8* [[TMP5]]
|
2019-10-13 16:08:18 +08:00
|
|
|
;
|
|
|
|
%2 = icmp eq i8* %0, null
|
|
|
|
br i1 %2, label %3, label %5
|
|
|
|
|
|
|
|
; <label>:3: ; preds = %1
|
|
|
|
%4 = tail call i8* @f1b(i8* nonnull @a2)
|
|
|
|
br label %5
|
|
|
|
|
|
|
|
; <label>:5: ; preds = %1, %3
|
|
|
|
%6 = phi i8* [ %4, %3 ], [ @a1, %1 ]
|
|
|
|
ret i8* %6
|
|
|
|
}
|
|
|
|
|
|
|
|
define align 4 i32* @test7b(i32* align 32 %p) #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree noinline nosync nounwind uwtable
|
2020-05-04 08:08:30 +08:00
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test7b
|
|
|
|
; IS__TUNIT____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[TMP1:%.*]] = tail call i8* @f1b(i8* noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1)
|
|
|
|
; IS__TUNIT____-NEXT: ret i32* [[P]]
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__CGSCC____: Function Attrs: nofree noinline nosync nounwind uwtable
|
2020-05-04 08:08:30 +08:00
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test7b
|
|
|
|
; IS__CGSCC____-SAME: (i32* nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = tail call i8* @f1b(i8* noalias nofree nonnull readnone align 8 dereferenceable(1) @a1)
|
|
|
|
; IS__CGSCC____-NEXT: ret i32* [[P]]
|
2019-10-13 16:08:18 +08:00
|
|
|
;
|
|
|
|
tail call i8* @f1b(i8* align 8 dereferenceable(1) @a1)
|
|
|
|
ret i32* %p
|
|
|
|
}
|
|
|
|
|
2019-07-28 15:04:01 +08:00
|
|
|
; TEST 8
|
|
|
|
define void @test8_helper() {
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test8_helper()
|
|
|
|
; CHECK-NEXT: [[PTR0:%.*]] = tail call i32* @unknown()
|
|
|
|
; CHECK-NEXT: [[PTR1:%.*]] = tail call align 4 i32* @unknown()
|
|
|
|
; CHECK-NEXT: [[PTR2:%.*]] = tail call align 8 i32* @unknown()
|
2020-05-04 08:08:30 +08:00
|
|
|
; CHECK-NEXT: tail call void @test8(i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone [[PTR0]])
|
|
|
|
; CHECK-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]])
|
|
|
|
; CHECK-NEXT: tail call void @test8(i32* noalias nocapture readnone align 8 [[PTR2]], i32* noalias nocapture readnone align 4 [[PTR1]], i32* noalias nocapture readnone align 4 [[PTR1]])
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-07-28 15:04:01 +08:00
|
|
|
%ptr0 = tail call i32* @unknown()
|
|
|
|
%ptr1 = tail call align 4 i32* @unknown()
|
|
|
|
%ptr2 = tail call align 8 i32* @unknown()
|
|
|
|
|
|
|
|
tail call void @test8(i32* %ptr1, i32* %ptr1, i32* %ptr0)
|
|
|
|
tail call void @test8(i32* %ptr2, i32* %ptr1, i32* %ptr1)
|
|
|
|
tail call void @test8(i32* %ptr2, i32* %ptr1, i32* %ptr1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2020-01-12 14:34:38 +08:00
|
|
|
declare void @user_i32_ptr(i32* nocapture readnone) nounwind
|
2019-07-28 15:04:01 +08:00
|
|
|
define internal void @test8(i32* %a, i32* %b, i32* %c) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nounwind
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test8
|
|
|
|
; IS__TUNIT____-SAME: (i32* noalias nocapture readnone align 4 [[A:%.*]], i32* noalias nocapture readnone align 4 [[B:%.*]], i32* noalias nocapture readnone [[C:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]])
|
|
|
|
; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]])
|
|
|
|
; IS__TUNIT____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]])
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__CGSCC____: Function Attrs: nounwind
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test8
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture readnone align 4 [[A:%.*]], i32* nocapture readnone align 4 [[B:%.*]], i32* nocapture readnone [[C:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[A]])
|
|
|
|
; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone align 4 [[B]])
|
|
|
|
; IS__CGSCC____-NEXT: call void @user_i32_ptr(i32* noalias nocapture readnone [[C]])
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
|
|
|
;
|
2019-10-13 16:08:18 +08:00
|
|
|
call void @user_i32_ptr(i32* %a)
|
|
|
|
call void @user_i32_ptr(i32* %b)
|
|
|
|
call void @user_i32_ptr(i32* %c)
|
2019-07-28 15:04:01 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
[Attributor] Towards a more structured deduction pattern
Summary:
This is the first commit aiming to structure the attribute deduction.
The base idea is that we have default propagation patterns as listed
below on top of which we can add specific, e.g., context sensitive,
logic.
Deduction patterns used in this patch:
- argument states are determined from call site argument states,
see AAAlignArgument and AAArgumentFromCallSiteArguments.
- call site argument states are determined as if they were floating
values, see AAAlignCallSiteArgument and AAAlignFloating.
- floating value states are determined by traversing the def-use chain
and combining the states determined for the leaves, see
AAAlignFloating and genericValueTraversal.
- call site return states are determined from function return states,
see AAAlignCallSiteReturned and AACallSiteReturnedFromReturned.
- function return states are determined from returned value states,
see AAAlignReturned and AAReturnedFromReturnedValues.
Through this strategy all logic for alignment is concentrated in the
AAAlignFloating::updateImpl method.
Note: This commit works on its own but is part of a larger change that
involves "on-demand" creation of abstract attributes that will
participate in the fixpoint iteration. Without this part, we sometimes
do not have an AAAlign abstract attribute to query, loosing information
we determined before. All tests have appropriate FIXMEs and the
information will be recovered once we added all parts.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66126
llvm-svn: 369144
2019-08-17 03:51:23 +08:00
|
|
|
declare void @test9_helper(i32* %A)
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
define void @test9_traversal(i1 %cnd, i32* align 4 %B, i32* align 8 %C) {
|
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test9_traversal
|
|
|
|
; CHECK-SAME: (i1 [[CND:%.*]], i32* align 4 [[B:%.*]], i32* align 8 [[C:%.*]])
|
|
|
|
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CND]], i32* [[B]], i32* [[C]]
|
|
|
|
; CHECK-NEXT: call void @test9_helper(i32* align 4 [[SEL]])
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
|
|
|
%sel = select i1 %cnd, i32* %B, i32* %C
|
[Attributor] Towards a more structured deduction pattern
Summary:
This is the first commit aiming to structure the attribute deduction.
The base idea is that we have default propagation patterns as listed
below on top of which we can add specific, e.g., context sensitive,
logic.
Deduction patterns used in this patch:
- argument states are determined from call site argument states,
see AAAlignArgument and AAArgumentFromCallSiteArguments.
- call site argument states are determined as if they were floating
values, see AAAlignCallSiteArgument and AAAlignFloating.
- floating value states are determined by traversing the def-use chain
and combining the states determined for the leaves, see
AAAlignFloating and genericValueTraversal.
- call site return states are determined from function return states,
see AAAlignCallSiteReturned and AACallSiteReturnedFromReturned.
- function return states are determined from returned value states,
see AAAlignReturned and AAReturnedFromReturnedValues.
Through this strategy all logic for alignment is concentrated in the
AAAlignFloating::updateImpl method.
Note: This commit works on its own but is part of a larger change that
involves "on-demand" creation of abstract attributes that will
participate in the fixpoint iteration. Without this part, we sometimes
do not have an AAAlign abstract attribute to query, loosing information
we determined before. All tests have appropriate FIXMEs and the
information will be recovered once we added all parts.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66126
llvm-svn: 369144
2019-08-17 03:51:23 +08:00
|
|
|
call void @test9_helper(i32* %sel)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-08-24 04:20:10 +08:00
|
|
|
; FIXME: This will work with an upcoming patch (D66618 or similar)
|
2019-09-04 04:37:24 +08:00
|
|
|
; define align 32 i32* @test10a(i32* align 32 "no-capture-maybe-returned" %p)
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; FIXME: This will work with an upcoming patch (D66618 or similar)
|
|
|
|
; store i32 1, i32* %r, align 32
|
|
|
|
; FIXME: This will work with an upcoming patch (D66618 or similar)
|
|
|
|
; store i32 -1, i32* %g1, align 32
|
2019-08-24 04:20:10 +08:00
|
|
|
define i32* @test10a(i32* align 32 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nofree nosync nounwind
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test10a
|
|
|
|
; CHECK-SAME: (i32* nofree nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]])
|
|
|
|
; CHECK-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
|
|
|
|
; CHECK-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
|
|
|
|
; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
|
|
|
|
; CHECK: t:
|
|
|
|
; CHECK-NEXT: [[R:%.*]] = call i32* @test10a(i32* nofree nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]])
|
2020-05-15 05:48:10 +08:00
|
|
|
; CHECK-NEXT: store i32 1, i32* [[R]], align 4
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
|
|
|
|
; CHECK-NEXT: br label [[E:%.*]]
|
|
|
|
; CHECK: f:
|
|
|
|
; CHECK-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 8
|
|
|
|
; CHECK-NEXT: store i32 -1, i32* [[G1]], align 4
|
|
|
|
; CHECK-NEXT: br label [[E]]
|
|
|
|
; CHECK: e:
|
|
|
|
; CHECK-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
|
|
|
|
; CHECK-NEXT: ret i32* [[PHI]]
|
|
|
|
;
|
2019-08-24 04:20:10 +08:00
|
|
|
%l = load i32, i32* %p
|
|
|
|
%c = icmp eq i32 %l, 0
|
|
|
|
br i1 %c, label %t, label %f
|
|
|
|
t:
|
|
|
|
%r = call i32* @test10a(i32* %p)
|
|
|
|
store i32 1, i32* %r
|
|
|
|
%g0 = getelementptr i32, i32* %p, i32 8
|
|
|
|
br label %e
|
|
|
|
f:
|
|
|
|
%g1 = getelementptr i32, i32* %p, i32 8
|
|
|
|
store i32 -1, i32* %g1
|
|
|
|
br label %e
|
|
|
|
e:
|
|
|
|
%phi = phi i32* [%g0, %t], [%g1, %f]
|
|
|
|
ret i32* %phi
|
|
|
|
}
|
|
|
|
|
|
|
|
; FIXME: This will work with an upcoming patch (D66618 or similar)
|
2019-09-04 04:37:24 +08:00
|
|
|
; define align 32 i32* @test10b(i32* align 32 "no-capture-maybe-returned" %p)
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; FIXME: This will work with an upcoming patch (D66618 or similar)
|
|
|
|
; store i32 1, i32* %r, align 32
|
|
|
|
; FIXME: This will work with an upcoming patch (D66618 or similar)
|
|
|
|
; store i32 -1, i32* %g1, align 32
|
2019-08-24 04:20:10 +08:00
|
|
|
define i32* @test10b(i32* align 32 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nofree nosync nounwind
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test10b
|
|
|
|
; CHECK-SAME: (i32* nofree nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]])
|
|
|
|
; CHECK-NEXT: [[L:%.*]] = load i32, i32* [[P]], align 32
|
|
|
|
; CHECK-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
|
|
|
|
; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
|
|
|
|
; CHECK: t:
|
|
|
|
; CHECK-NEXT: [[R:%.*]] = call i32* @test10b(i32* nofree nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]])
|
2020-05-15 05:48:10 +08:00
|
|
|
; CHECK-NEXT: store i32 1, i32* [[R]], align 4
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-NEXT: [[G0:%.*]] = getelementptr i32, i32* [[P]], i32 8
|
|
|
|
; CHECK-NEXT: br label [[E:%.*]]
|
|
|
|
; CHECK: f:
|
|
|
|
; CHECK-NEXT: [[G1:%.*]] = getelementptr i32, i32* [[P]], i32 -8
|
|
|
|
; CHECK-NEXT: store i32 -1, i32* [[G1]], align 4
|
|
|
|
; CHECK-NEXT: br label [[E]]
|
|
|
|
; CHECK: e:
|
|
|
|
; CHECK-NEXT: [[PHI:%.*]] = phi i32* [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
|
|
|
|
; CHECK-NEXT: ret i32* [[PHI]]
|
|
|
|
;
|
2019-08-24 04:20:10 +08:00
|
|
|
%l = load i32, i32* %p
|
|
|
|
%c = icmp eq i32 %l, 0
|
|
|
|
br i1 %c, label %t, label %f
|
|
|
|
t:
|
|
|
|
%r = call i32* @test10b(i32* %p)
|
|
|
|
store i32 1, i32* %r
|
|
|
|
%g0 = getelementptr i32, i32* %p, i32 8
|
|
|
|
br label %e
|
|
|
|
f:
|
|
|
|
%g1 = getelementptr i32, i32* %p, i32 -8
|
|
|
|
store i32 -1, i32* %g1
|
|
|
|
br label %e
|
|
|
|
e:
|
|
|
|
%phi = phi i32* [%g0, %t], [%g1, %f]
|
|
|
|
ret i32* %phi
|
|
|
|
}
|
2019-07-28 15:04:01 +08:00
|
|
|
|
2019-11-12 14:36:49 +08:00
|
|
|
|
|
|
|
define i64 @test11(i32* %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test11
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8
|
|
|
|
; IS__TUNIT____-NEXT: ret i64 [[RET]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test11
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 8 dereferenceable(8) [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[P_CAST]], align 8
|
|
|
|
; IS__CGSCC____-NEXT: ret i64 [[RET]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-11-12 14:36:49 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%ret = load i64, i64* %p-cast, align 8
|
|
|
|
ret i64 %ret
|
|
|
|
}
|
2019-11-26 15:51:59 +08:00
|
|
|
|
|
|
|
; TEST 12
|
2019-12-31 14:57:00 +08:00
|
|
|
; Test for deduction using must-be-executed-context and GEP instruction
|
2019-11-26 15:51:59 +08:00
|
|
|
|
|
|
|
; FXIME: %p should have nonnull
|
|
|
|
define i64 @test12-1(i32* align 4 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-1
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
|
|
|
|
; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
|
|
|
|
; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16
|
|
|
|
; IS__TUNIT____-NEXT: ret i64 [[RET]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-1
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree readonly align 16 [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
|
|
|
|
; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
|
|
|
|
; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX1]], align 16
|
|
|
|
; IS__CGSCC____-NEXT: ret i64 [[RET]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-11-26 15:51:59 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 1
|
|
|
|
%arrayidx1 = getelementptr i64, i64* %arrayidx0, i64 3
|
|
|
|
%ret = load i64, i64* %arrayidx1, align 16
|
|
|
|
ret i64 %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @test12-2(i32* align 4 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-2
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
|
|
|
|
; IS__TUNIT____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16
|
|
|
|
; IS__TUNIT____-NEXT: ret i64 [[RET]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-2
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 16 dereferenceable(8) [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
|
|
|
|
; IS__CGSCC____-NEXT: [[RET:%.*]] = load i64, i64* [[ARRAYIDX0]], align 16
|
|
|
|
; IS__CGSCC____-NEXT: ret i64 [[RET]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-11-26 15:51:59 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
|
|
|
|
%ret = load i64, i64* %arrayidx0, align 16
|
|
|
|
ret i64 %ret
|
|
|
|
}
|
|
|
|
|
|
|
|
; FXIME: %p should have nonnull
|
|
|
|
define void @test12-3(i32* align 4 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-3
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
|
|
|
|
; IS__TUNIT____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
|
|
|
|
; IS__TUNIT____-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-3
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree writeonly align 16 [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
|
|
|
|
; IS__CGSCC____-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
|
|
|
|
; IS__CGSCC____-NEXT: store i64 0, i64* [[ARRAYIDX1]], align 16
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-11-26 15:51:59 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 1
|
|
|
|
%arrayidx1 = getelementptr i64, i64* %arrayidx0, i64 3
|
|
|
|
store i64 0, i64* %arrayidx1, align 16
|
2019-12-31 14:57:00 +08:00
|
|
|
ret void
|
2019-11-26 15:51:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define void @test12-4(i32* align 4 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test12-4
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__TUNIT____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
|
|
|
|
; IS__TUNIT____-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test12-4
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 16 dereferenceable(8) [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; IS__CGSCC____-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
|
|
|
|
; IS__CGSCC____-NEXT: store i64 0, i64* [[ARRAYIDX0]], align 16
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2019-11-26 15:51:59 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
|
|
|
|
store i64 0, i64* %arrayidx0, align 16
|
2019-12-31 14:57:00 +08:00
|
|
|
ret void
|
2019-11-26 15:51:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare void @use(i64*) willreturn nounwind
|
|
|
|
|
|
|
|
define void @test12-5(i32* align 4 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nounwind willreturn
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test12-5
|
|
|
|
; CHECK-SAME: (i32* align 16 [[P:%.*]])
|
|
|
|
; CHECK-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; CHECK-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 1
|
|
|
|
; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr i64, i64* [[ARRAYIDX0]], i64 3
|
|
|
|
; CHECK-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX1]])
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-11-26 15:51:59 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 1
|
|
|
|
%arrayidx1 = getelementptr i64, i64* %arrayidx0, i64 3
|
|
|
|
tail call void @use(i64* align 16 %arrayidx1)
|
2019-12-31 14:57:00 +08:00
|
|
|
ret void
|
2019-11-26 15:51:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define void @test12-6(i32* align 4 %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; CHECK: Function Attrs: nounwind willreturn
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@test12-6
|
|
|
|
; CHECK-SAME: (i32* align 16 [[P:%.*]])
|
|
|
|
; CHECK-NEXT: [[P_CAST:%.*]] = bitcast i32* [[P]] to i64*
|
|
|
|
; CHECK-NEXT: [[ARRAYIDX0:%.*]] = getelementptr i64, i64* [[P_CAST]], i64 0
|
|
|
|
; CHECK-NEXT: tail call void @use(i64* align 16 [[ARRAYIDX0]])
|
|
|
|
; CHECK-NEXT: ret void
|
|
|
|
;
|
2019-11-26 15:51:59 +08:00
|
|
|
%p-cast = bitcast i32* %p to i64*
|
|
|
|
%arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
|
|
|
|
tail call void @use(i64* align 16 %arrayidx0)
|
2019-12-31 14:57:00 +08:00
|
|
|
ret void
|
2019-11-26 15:51:59 +08:00
|
|
|
}
|
|
|
|
|
2020-01-22 06:04:47 +08:00
|
|
|
define void @test13(i1 %c, i32* align 32 %dst) #0 {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test13
|
|
|
|
; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__TUNIT____: truebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__TUNIT____: falsebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END]]
|
|
|
|
; IS__TUNIT____: end:
|
|
|
|
; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ]
|
|
|
|
; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test13
|
|
|
|
; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__CGSCC____: truebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__CGSCC____: falsebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END]]
|
|
|
|
; IS__CGSCC____: end:
|
|
|
|
; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ null, [[FALSEBB]] ]
|
|
|
|
; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
2020-01-22 06:04:47 +08:00
|
|
|
;
|
|
|
|
br i1 %c, label %truebb, label %falsebb
|
|
|
|
truebb:
|
|
|
|
br label %end
|
|
|
|
falsebb:
|
|
|
|
br label %end
|
|
|
|
end:
|
|
|
|
%ptr = phi i32* [ %dst, %truebb ], [ null, %falsebb ]
|
|
|
|
store i32 0, i32* %ptr
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test13-1(i1 %c, i32* align 32 %dst) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-1
|
|
|
|
; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__TUNIT____: truebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__TUNIT____: falsebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END]]
|
|
|
|
; IS__TUNIT____: end:
|
|
|
|
; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ]
|
|
|
|
; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 16
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-1
|
|
|
|
; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__CGSCC____: truebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__CGSCC____: falsebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END]]
|
|
|
|
; IS__CGSCC____: end:
|
|
|
|
; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 48 to i32*), [[FALSEBB]] ]
|
|
|
|
; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 16
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
2020-01-22 06:04:47 +08:00
|
|
|
;
|
|
|
|
br i1 %c, label %truebb, label %falsebb
|
|
|
|
truebb:
|
|
|
|
br label %end
|
|
|
|
falsebb:
|
|
|
|
br label %end
|
|
|
|
end:
|
|
|
|
%ptr = phi i32* [ %dst, %truebb ], [ inttoptr (i64 48 to i32*), %falsebb ]
|
|
|
|
store i32 0, i32* %ptr
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test13-2(i1 %c, i32* align 32 %dst) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-2
|
|
|
|
; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__TUNIT____: truebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__TUNIT____: falsebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END]]
|
|
|
|
; IS__TUNIT____: end:
|
|
|
|
; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ]
|
|
|
|
; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-2
|
|
|
|
; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__CGSCC____: truebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__CGSCC____: falsebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END]]
|
|
|
|
; IS__CGSCC____: end:
|
|
|
|
; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 160 to i32*), [[FALSEBB]] ]
|
|
|
|
; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
2020-01-22 06:04:47 +08:00
|
|
|
;
|
|
|
|
br i1 %c, label %truebb, label %falsebb
|
|
|
|
truebb:
|
|
|
|
br label %end
|
|
|
|
falsebb:
|
|
|
|
br label %end
|
|
|
|
end:
|
|
|
|
%ptr = phi i32* [ %dst, %truebb ], [ inttoptr (i64 160 to i32*), %falsebb ]
|
|
|
|
store i32 0, i32* %ptr
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test13-3(i1 %c, i32* align 32 %dst) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-3
|
|
|
|
; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__TUNIT____: truebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__TUNIT____: falsebb:
|
|
|
|
; IS__TUNIT____-NEXT: br label [[END]]
|
|
|
|
; IS__TUNIT____: end:
|
|
|
|
; IS__TUNIT____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ]
|
|
|
|
; IS__TUNIT____-NEXT: store i32 0, i32* [[PTR]], align 32
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@test13-3
|
|
|
|
; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]]
|
|
|
|
; IS__CGSCC____: truebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END:%.*]]
|
|
|
|
; IS__CGSCC____: falsebb:
|
|
|
|
; IS__CGSCC____-NEXT: br label [[END]]
|
|
|
|
; IS__CGSCC____: end:
|
|
|
|
; IS__CGSCC____-NEXT: [[PTR:%.*]] = phi i32* [ [[DST]], [[TRUEBB]] ], [ inttoptr (i64 128 to i32*), [[FALSEBB]] ]
|
|
|
|
; IS__CGSCC____-NEXT: store i32 0, i32* [[PTR]], align 32
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
2020-01-22 06:04:47 +08:00
|
|
|
;
|
|
|
|
br i1 %c, label %truebb, label %falsebb
|
|
|
|
truebb:
|
|
|
|
br label %end
|
|
|
|
falsebb:
|
|
|
|
br label %end
|
|
|
|
end:
|
|
|
|
%ptr = phi i32* [ %dst, %truebb ], [ inttoptr (i64 128 to i32*), %falsebb ]
|
|
|
|
store i32 0, i32* %ptr
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2020-01-03 06:41:17 +08:00
|
|
|
; Don't crash on ptr2int/int2ptr uses.
|
|
|
|
define i64 @ptr2int(i32* %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr2int
|
|
|
|
; IS__TUNIT____-SAME: (i32* nofree readnone [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64
|
|
|
|
; IS__TUNIT____-NEXT: ret i64 [[P2I]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr2int
|
|
|
|
; IS__CGSCC____-SAME: (i32* nofree readnone [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[P2I:%.*]] = ptrtoint i32* [[P]] to i64
|
|
|
|
; IS__CGSCC____-NEXT: ret i64 [[P2I]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2020-01-03 06:41:17 +08:00
|
|
|
%p2i = ptrtoint i32* %p to i64
|
|
|
|
ret i64 %p2i
|
|
|
|
}
|
|
|
|
define i64* @int2ptr(i64 %i) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@int2ptr
|
|
|
|
; IS__TUNIT____-SAME: (i64 [[I:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64*
|
|
|
|
; IS__TUNIT____-NEXT: ret i64* [[I2P]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@int2ptr
|
|
|
|
; IS__CGSCC____-SAME: (i64 [[I:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[I2P:%.*]] = inttoptr i64 [[I]] to i64*
|
|
|
|
; IS__CGSCC____-NEXT: ret i64* [[I2P]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2020-01-03 06:41:17 +08:00
|
|
|
%i2p = inttoptr i64 %i to i64*
|
|
|
|
ret i64* %i2p
|
|
|
|
}
|
|
|
|
|
2020-01-11 02:13:10 +08:00
|
|
|
; Use the store alignment only for the pointer operand.
|
|
|
|
define void @aligned_store(i8* %Value, i8** %Ptr) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@aligned_store
|
|
|
|
; IS__TUNIT____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@aligned_store
|
|
|
|
; IS__CGSCC____-SAME: (i8* nofree writeonly [[VALUE:%.*]], i8** nocapture nofree nonnull writeonly align 32 dereferenceable(8) [[PTR:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: store i8* [[VALUE]], i8** [[PTR]], align 32
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2020-01-11 02:13:10 +08:00
|
|
|
store i8* %Value, i8** %Ptr, align 32
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2020-02-20 06:52:16 +08:00
|
|
|
declare i8* @some_func(i8*)
|
|
|
|
define void @align_call_op_not_store(i8* align 2048 %arg) {
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-LABEL: define {{[^@]+}}@align_call_op_not_store
|
|
|
|
; CHECK-SAME: (i8* align 2048 [[ARG:%.*]])
|
|
|
|
; CHECK-NEXT: [[UNKNOWN:%.*]] = call i8* @some_func(i8* align 2048 [[ARG]])
|
2020-05-11 02:16:49 +08:00
|
|
|
; CHECK-NEXT: store i8 0, i8* [[UNKNOWN]], align 1
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; CHECK-NEXT: ret void
|
2020-02-20 06:52:16 +08:00
|
|
|
;
|
|
|
|
%unknown = call i8* @some_func(i8* %arg)
|
|
|
|
store i8 0, i8* %unknown
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @align_store_after_bc(i32* align 2048 %arg) {
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@align_store_after_bc
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8*
|
|
|
|
; IS__TUNIT____-NEXT: store i8 0, i8* [[BC]], align 2048
|
|
|
|
; IS__TUNIT____-NEXT: ret void
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@align_store_after_bc
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull writeonly align 2048 dereferenceable(1) [[ARG:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[BC:%.*]] = bitcast i32* [[ARG]] to i8*
|
|
|
|
; IS__CGSCC____-NEXT: store i8 0, i8* [[BC]], align 2048
|
|
|
|
; IS__CGSCC____-NEXT: ret void
|
2020-02-20 06:52:16 +08:00
|
|
|
;
|
|
|
|
%bc = bitcast i32* %arg to i8*
|
|
|
|
store i8 0, i8* %bc
|
|
|
|
ret void
|
|
|
|
}
|
2020-04-02 10:07:41 +08:00
|
|
|
|
|
|
|
; Make sure we do not annotate the callee of a must-tail call with an alignment
|
|
|
|
; we cannot also put on the caller.
|
|
|
|
@cnd = external global i1
|
|
|
|
define i32 @musttail_callee_1(i32* %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn
|
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_callee_1
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32
|
|
|
|
; IS__TUNIT____-NEXT: ret i32 [[V]]
|
|
|
|
;
|
|
|
|
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
|
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@musttail_callee_1
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly dereferenceable(4) [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[V:%.*]] = load i32, i32* [[P]], align 32
|
|
|
|
; IS__CGSCC____-NEXT: ret i32 [[V]]
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
;
|
2020-04-02 10:07:41 +08:00
|
|
|
%v = load i32, i32* %p, align 32
|
|
|
|
ret i32 %v
|
|
|
|
}
|
|
|
|
define i32 @musttail_caller_1(i32* %p) {
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__TUNIT____-LABEL: define {{[^@]+}}@musttail_caller_1
|
|
|
|
; IS__TUNIT____-SAME: (i32* nocapture nofree readonly [[P:%.*]])
|
|
|
|
; IS__TUNIT____-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1
|
|
|
|
; IS__TUNIT____-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
|
|
|
|
; IS__TUNIT____: mt:
|
|
|
|
; IS__TUNIT____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree readonly [[P]])
|
|
|
|
; IS__TUNIT____-NEXT: ret i32 [[V]]
|
|
|
|
; IS__TUNIT____: exit:
|
|
|
|
; IS__TUNIT____-NEXT: ret i32 0
|
|
|
|
;
|
2020-07-20 03:55:43 +08:00
|
|
|
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
|
[Attributor] Unify testing (=updates,prefixes,run configurations,...)
When the Attributor was created the test update scripts were not well
suited to deal with the challenges of IR attribute checking. This
partially improved.
Since then we also added three additional configurations that need
testing; in total we now have the following four:
{ TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) }
Finally, the number of developers and tests grew rapidly (partially due
to the addition of ArgumentPromotion and IPConstantProp tests), which
resulted in tests only being run in some configurations, different
prefixes being used, and different "styles" of checks being used.
Due to the above reasons I believed we needed to take another look at
the test update scripts. While we started to use them, via UTC_ARGS:
--enable/disable, the other problems remained. To improve the testing
situation for *all* configurations, to simplify future updates to the
test, and to help identify subtle effects of future changes, we now use
the test update scripts for (almost) all Attributor tests.
An exhaustive prefix list minimizes the number of check lines and makes
it easy to identify and compare configurations.
Tests have been adjusted in the process but we tried to keep their
intend unchanged.
Reviewed By: sstefan1
Differential Revision: https://reviews.llvm.org/D76588
2020-04-09 08:04:57 +08:00
|
|
|
; IS__CGSCC____-LABEL: define {{[^@]+}}@musttail_caller_1
|
|
|
|
; IS__CGSCC____-SAME: (i32* nocapture nofree readonly [[P:%.*]])
|
|
|
|
; IS__CGSCC____-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1
|
|
|
|
; IS__CGSCC____-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
|
|
|
|
; IS__CGSCC____: mt:
|
|
|
|
; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree nonnull readonly dereferenceable(4) [[P]])
|
|
|
|
; IS__CGSCC____-NEXT: ret i32 [[V]]
|
|
|
|
; IS__CGSCC____: exit:
|
|
|
|
; IS__CGSCC____-NEXT: ret i32 0
|
|
|
|
;
|
2020-04-02 10:07:41 +08:00
|
|
|
%c = load i1, i1* @cnd
|
|
|
|
br i1 %c, label %mt, label %exit
|
|
|
|
mt:
|
|
|
|
%v = musttail call i32 @musttail_callee_1(i32* %p)
|
|
|
|
ret i32 %v
|
|
|
|
exit:
|
|
|
|
ret i32 0
|
|
|
|
}
|
2020-02-20 06:52:16 +08:00
|
|
|
|
2019-07-28 15:04:01 +08:00
|
|
|
attributes #0 = { nounwind uwtable noinline }
|
|
|
|
attributes #1 = { uwtable noinline }
|
2020-04-25 18:57:07 +08:00
|
|
|
attributes #2 = { null_pointer_is_valid }
|