-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=attributor -attributor-disable=false -S < %s | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
+; RUN: opt -attributor -attributor-disable=false -S < %s | FileCheck %s --check-prefixes=CHECK,OLD_PM
+; RUN: opt -passes=attributor -attributor-disable=false -S < %s | FileCheck %s --check-prefixes=CHECK,NEW_PM
define i32 @test0(i32* %p) {
; CHECK-LABEL: define {{[^@]+}}@test0
declare dso_local void @unkown()
define internal i32 @r1(i32) local_unnamed_addr {
-; CHECK-LABEL: define {{[^@]+}}@r1() local_unnamed_addr
-; CHECK-NEXT: br label [[TMP3:%.*]]
-; CHECK: 1:
-; CHECK-NEXT: br label [[F:%.*]]
-; CHECK: 2:
-; CHECK-NEXT: unreachable
-; CHECK: f:
-; CHECK-NEXT: ret i32 10
-; CHECK: 3:
-; CHECK-NEXT: [[TMP4:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP7:%.*]], [[TMP3]] ]
-; CHECK-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP6:%.*]], [[TMP3]] ]
-; CHECK-NEXT: [[TMP6]] = add nuw nsw i32 [[TMP4]], [[TMP5]]
-; CHECK-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP4]], 1
-; CHECK-NEXT: [[TMP8:%.*]] = icmp eq i32 [[TMP7]], 100
-; CHECK-NEXT: br i1 [[TMP8]], label [[TMP1:%.*]], label [[TMP3]]
+; OLD_PM-LABEL: define {{[^@]+}}@r1() local_unnamed_addr
+; OLD_PM-NEXT: br label [[TMP4:%.*]]
+; OLD_PM: 1:
+; OLD_PM-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP7:%.*]], 10000
+; OLD_PM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[F:%.*]]
+; OLD_PM: 3:
+; OLD_PM-NEXT: ret i32 20
+; OLD_PM: f:
+; OLD_PM-NEXT: ret i32 10
+; OLD_PM: 4:
+; OLD_PM-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP8:%.*]], [[TMP4]] ]
+; OLD_PM-NEXT: [[TMP6:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP7]], [[TMP4]] ]
+; OLD_PM-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP5]], [[TMP6]]
+; OLD_PM-NEXT: [[TMP8]] = add nuw nsw i32 [[TMP5]], 1
+; OLD_PM-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 100
+; OLD_PM-NEXT: br i1 [[TMP9]], label [[TMP1:%.*]], label [[TMP4]]
+;
+; NEW_PM-LABEL: define {{[^@]+}}@r1() local_unnamed_addr
+; NEW_PM-NEXT: br label [[TMP3:%.*]]
+; NEW_PM: 1:
+; NEW_PM-NEXT: br label [[F:%.*]]
+; NEW_PM: 2:
+; NEW_PM-NEXT: unreachable
+; NEW_PM: f:
+; NEW_PM-NEXT: ret i32 10
+; NEW_PM: 3:
+; NEW_PM-NEXT: [[TMP4:%.*]] = phi i32 [ 0, [[TMP0:%.*]] ], [ [[TMP7:%.*]], [[TMP3]] ]
+; NEW_PM-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[TMP0]] ], [ [[TMP6:%.*]], [[TMP3]] ]
+; NEW_PM-NEXT: [[TMP6]] = add nuw nsw i32 [[TMP4]], [[TMP5]]
+; NEW_PM-NEXT: [[TMP7]] = add nuw nsw i32 [[TMP4]], 1
+; NEW_PM-NEXT: [[TMP8:%.*]] = icmp eq i32 [[TMP7]], 100
+; NEW_PM-NEXT: br i1 [[TMP8]], label [[TMP1:%.*]], label [[TMP3]]
;
br label %5
}
define void @f1(i32){
-; CHECK-LABEL: define {{[^@]+}}@f1
-; CHECK-SAME: (i32 [[TMP0:%.*]])
-; CHECK-NEXT: [[TMP2:%.*]] = tail call i32 @r1()
-; CHECK-NEXT: br label [[TMP4:%.*]]
-; CHECK: 3:
-; CHECK-NEXT: unreachable
-; CHECK: 4:
-; CHECK-NEXT: ret void
+; OLD_PM-LABEL: define {{[^@]+}}@f1
+; OLD_PM-SAME: (i32 [[TMP0:%.*]])
+; OLD_PM-NEXT: [[TMP2:%.*]] = tail call i32 @r1()
+; OLD_PM-NEXT: [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 15
+; OLD_PM-NEXT: br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP5:%.*]]
+; OLD_PM: 4:
+; OLD_PM-NEXT: tail call void @unkown()
+; OLD_PM-NEXT: br label [[TMP5]]
+; OLD_PM: 5:
+; OLD_PM-NEXT: ret void
+;
+; NEW_PM-LABEL: define {{[^@]+}}@f1
+; NEW_PM-SAME: (i32 [[TMP0:%.*]])
+; NEW_PM-NEXT: [[TMP2:%.*]] = tail call i32 @r1()
+; NEW_PM-NEXT: br label [[TMP4:%.*]]
+; NEW_PM: 3:
+; NEW_PM-NEXT: unreachable
+; NEW_PM: 4:
+; NEW_PM-NEXT: ret void
;
%2 = tail call i32 @r1(i32 %0)
%3 = icmp sgt i32 %2, 15