@@ -10,9 +10,8 @@ declare i8 @buz.ptr(ptr, ptr)
1010define i8 @same_parent_combine_diff_attrs (i8 %x , i8 %y ) {
1111; CHECK-LABEL: define i8 @same_parent_combine_diff_attrs(
1212; CHECK-SAME: i8 [[X:%.*]], i8 [[Y:%.*]]) {
13- ; CHECK-NEXT: [[C2:%.*]] = call i8 @baz(i8 noundef [[X]], i8 noundef [[Y]]) #[[ATTR0:[0-9]+]]
14- ; CHECK-NEXT: [[C1:%.*]] = call i8 @baz(i8 [[X]], i8 noundef [[Y]]) #[[ATTR0]]
15- ; CHECK-NEXT: [[R:%.*]] = call i8 @buz(i8 [[C1]], i8 [[C2]])
13+ ; CHECK-NEXT: [[C1:%.*]] = call i8 @baz(i8 [[X]], i8 noundef [[Y]]) #[[ATTR0:[0-9]+]]
14+ ; CHECK-NEXT: [[R:%.*]] = call i8 @buz(i8 [[C1]], i8 [[C1]])
1615; CHECK-NEXT: ret i8 [[R]]
1716;
1817 %c1 = call i8 @baz (i8 noundef %x , i8 noundef %y ) readnone
@@ -25,9 +24,8 @@ define i8 @same_parent_combine_diff_attrs(i8 %x, i8 %y) {
2524define i8 @same_parent_combine_diff_attrs_needs_intersect (i8 %x , i8 %y ) {
2625; CHECK-LABEL: define i8 @same_parent_combine_diff_attrs_needs_intersect(
2726; CHECK-SAME: i8 [[X:%.*]], i8 [[Y:%.*]]) {
28- ; CHECK-NEXT: [[C1:%.*]] = call nonnull ptr @baz.ptr(i8 noundef [[X]], i8 noundef [[Y]]) #[[ATTR0]]
29- ; CHECK-NEXT: [[C0:%.*]] = call ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR0]]
30- ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C0]], ptr [[C1]])
27+ ; CHECK-NEXT: [[C1:%.*]] = call ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR0]]
28+ ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C1]], ptr [[C1]])
3129; CHECK-NEXT: ret i8 [[R]]
3230;
3331 %c1 = call nonnull ptr @baz.ptr (i8 noundef %x , i8 noundef %y ) readnone
@@ -40,9 +38,8 @@ define i8 @same_parent_combine_diff_attrs_needs_intersect(i8 %x, i8 %y) {
4038define i8 @same_parent_combine_diff_attrs_needs_intersect2 (i8 %x , i8 %y ) {
4139; CHECK-LABEL: define i8 @same_parent_combine_diff_attrs_needs_intersect2(
4240; CHECK-SAME: i8 [[X:%.*]], i8 [[Y:%.*]]) {
43- ; CHECK-NEXT: [[C1:%.*]] = call nonnull ptr @baz.ptr(i8 noundef [[X]], i8 noundef [[Y]]) #[[ATTR1:[0-9]+]]
44- ; CHECK-NEXT: [[C0:%.*]] = call ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR1]]
45- ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C0]], ptr [[C1]])
41+ ; CHECK-NEXT: [[C1:%.*]] = call ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR1:[0-9]+]]
42+ ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C1]], ptr [[C1]])
4643; CHECK-NEXT: ret i8 [[R]]
4744;
4845 %c1 = call nonnull ptr @baz.ptr (i8 noundef %x , i8 noundef %y ) readonly
@@ -55,9 +52,8 @@ define i8 @same_parent_combine_diff_attrs_needs_intersect2(i8 %x, i8 %y) {
5552define i8 @same_parent_combine_diff_attrs_really_needs_intersect (i8 %x , i8 %y ) {
5653; CHECK-LABEL: define i8 @same_parent_combine_diff_attrs_really_needs_intersect(
5754; CHECK-SAME: i8 [[X:%.*]], i8 [[Y:%.*]]) {
58- ; CHECK-NEXT: [[C1:%.*]] = call nonnull ptr @baz.ptr(i8 noundef [[X]], i8 noundef [[Y]]) #[[ATTR1]]
59- ; CHECK-NEXT: [[C0:%.*]] = call ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR1]]
60- ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C0]], ptr noundef [[C1]])
55+ ; CHECK-NEXT: [[C1:%.*]] = call ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR1]]
56+ ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C1]], ptr noundef [[C1]])
6157; CHECK-NEXT: ret i8 [[R]]
6258;
6359 %c1 = call nonnull ptr @baz.ptr (i8 noundef %x , i8 noundef %y ) readonly
@@ -128,8 +124,7 @@ define i8 @diff_parent_combine_diff_attrs_preserves_return_attrs(i1 %c, i8 %x, i
128124; CHECK-NEXT: [[C1:%.*]] = call nonnull ptr @baz.ptr(i8 [[X]], i8 noundef [[Y]]) #[[ATTR1]]
129125; CHECK-NEXT: br i1 [[C]], label %[[T:.*]], label %[[F:.*]]
130126; CHECK: [[T]]:
131- ; CHECK-NEXT: [[C0:%.*]] = call nonnull ptr @baz.ptr(i8 noundef [[X]], i8 noundef [[Y]]) #[[ATTR1]]
132- ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C0]], ptr noundef [[C1]])
127+ ; CHECK-NEXT: [[R:%.*]] = call i8 @buz.ptr(ptr [[C1]], ptr noundef [[C1]])
133128; CHECK-NEXT: ret i8 [[R]]
134129; CHECK: [[F]]:
135130; CHECK-NEXT: ret i8 9
0 commit comments