[llvm] 1a9d495 - [GVN] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 03:40:34 PDT 2023
Author: Nikita Popov
Date: 2023-03-22T11:40:07+01:00
New Revision: 1a9d49524a5243df669bce152870beca2b6d7aeb
URL: https://github.com/llvm/llvm-project/commit/1a9d49524a5243df669bce152870beca2b6d7aeb
DIFF: https://github.com/llvm/llvm-project/commit/1a9d49524a5243df669bce152870beca2b6d7aeb.diff
LOG: [GVN] Regenerate test checks (NFC)
Added:
Modified:
llvm/test/Transforms/GVN/range.ll
llvm/test/Transforms/NewGVN/range.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/GVN/range.ll b/llvm/test/Transforms/GVN/range.ll
index 8705d521ae05c..ae0801ee59da1 100644
--- a/llvm/test/Transforms/GVN/range.ll
+++ b/llvm/test/Transforms/GVN/range.ll
@@ -1,9 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 2
; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @test1(ptr %p) {
-; CHECK-LABEL: @test1(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test1
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p, !range !0
%c = add i32 %a, %b
@@ -11,9 +15,12 @@ define i32 @test1(ptr %p) {
}
define i32 @test2(ptr %p) {
-; CHECK-LABEL: @test2(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test2
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p
%c = add i32 %a, %b
@@ -21,9 +28,12 @@ define i32 @test2(ptr %p) {
}
define i32 @test3(ptr %p) {
-; CHECK-LABEL: @test3(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test3
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p, !range !1
%c = add i32 %a, %b
@@ -31,9 +41,12 @@ define i32 @test3(ptr %p) {
}
define i32 @test4(ptr %p) {
-; CHECK-LABEL: @test4(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test4
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p, !range !2
%c = add i32 %a, %b
@@ -41,9 +54,12 @@ define i32 @test4(ptr %p) {
}
define i32 @test5(ptr %p) {
-; CHECK-LABEL: @test5(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE3:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test5
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG1:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !3
%b = load i32, ptr %p, !range !4
%c = add i32 %a, %b
@@ -51,9 +67,12 @@ define i32 @test5(ptr %p) {
}
define i32 @test6(ptr %p) {
-; CHECK-LABEL: @test6(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE5:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test6
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG2:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !5
%b = load i32, ptr %p, !range !6
%c = add i32 %a, %b
@@ -61,9 +80,12 @@ define i32 @test6(ptr %p) {
}
define i32 @test7(ptr %p) {
-; CHECK-LABEL: @test7(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE7:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test7
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG3:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !7
%b = load i32, ptr %p, !range !8
%c = add i32 %a, %b
@@ -71,21 +93,18 @@ define i32 @test7(ptr %p) {
}
define i32 @test8(ptr %p) {
-; CHECK-LABEL: @test8(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE9:[0-9]+]]
-; CHECK-NOT: range
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test8
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG4:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !9
%b = load i32, ptr %p, !range !10
%c = add i32 %a, %b
ret i32 %c
}
-; CHECK: ![[RANGE0]] = !{i32 0, i32 2}
-; CHECK: ![[RANGE3]] = !{i32 -5, i32 -2}
-; CHECK: ![[RANGE5]] = !{i32 10, i32 1}
-; CHECK: ![[RANGE7]] = !{i32 1, i32 2, i32 3, i32 4}
-; CHECK: ![[RANGE9]] = !{i32 1, i32 5}
!0 = !{i32 0, i32 2}
!1 = !{i32 3, i32 5}
@@ -98,3 +117,10 @@ define i32 @test8(ptr %p) {
!8 = !{i32 5, i32 1}
!9 = !{i32 1, i32 5}
!10 = !{i32 5, i32 1}
+;.
+; CHECK: [[RNG0]] = !{i32 0, i32 2}
+; CHECK: [[RNG1]] = !{i32 -5, i32 -2}
+; CHECK: [[RNG2]] = !{i32 10, i32 1}
+; CHECK: [[RNG3]] = !{i32 1, i32 2, i32 3, i32 4}
+; CHECK: [[RNG4]] = !{i32 1, i32 5}
+;.
diff --git a/llvm/test/Transforms/NewGVN/range.ll b/llvm/test/Transforms/NewGVN/range.ll
index 4adfa3da7c1f9..8803737c7bd4a 100644
--- a/llvm/test/Transforms/NewGVN/range.ll
+++ b/llvm/test/Transforms/NewGVN/range.ll
@@ -1,9 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 2
; RUN: opt -passes=newgvn -S < %s | FileCheck %s
define i32 @test1(ptr %p) {
-; CHECK-LABEL: @test1(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test1
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p, !range !0
%c = add i32 %a, %b
@@ -11,9 +15,12 @@ define i32 @test1(ptr %p) {
}
define i32 @test2(ptr %p) {
-; CHECK-LABEL: @test2(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test2
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p
%c = add i32 %a, %b
@@ -21,9 +28,12 @@ define i32 @test2(ptr %p) {
}
define i32 @test3(ptr %p) {
-; CHECK-LABEL: @test3(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test3
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p, !range !1
%c = add i32 %a, %b
@@ -31,9 +41,12 @@ define i32 @test3(ptr %p) {
}
define i32 @test4(ptr %p) {
-; CHECK-LABEL: @test4(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE0]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test4
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG0]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !0
%b = load i32, ptr %p, !range !2
%c = add i32 %a, %b
@@ -41,9 +54,12 @@ define i32 @test4(ptr %p) {
}
define i32 @test5(ptr %p) {
-; CHECK-LABEL: @test5(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE3:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test5
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG1:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !3
%b = load i32, ptr %p, !range !4
%c = add i32 %a, %b
@@ -51,9 +67,12 @@ define i32 @test5(ptr %p) {
}
define i32 @test6(ptr %p) {
-; CHECK-LABEL: @test6(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE5:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test6
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG2:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !5
%b = load i32, ptr %p, !range !6
%c = add i32 %a, %b
@@ -61,9 +80,12 @@ define i32 @test6(ptr %p) {
}
define i32 @test7(ptr %p) {
-; CHECK-LABEL: @test7(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE7:[0-9]+]]
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test7
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG3:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !7
%b = load i32, ptr %p, !range !8
%c = add i32 %a, %b
@@ -71,21 +93,18 @@ define i32 @test7(ptr %p) {
}
define i32 @test8(ptr %p) {
-; CHECK-LABEL: @test8(ptr %p)
-; CHECK: %a = load i32, ptr %p, align 4, !range ![[RANGE9:[0-9]+]]
-; CHECK-NOT: range
-; CHECK: %c = add i32 %a, %a
+; CHECK-LABEL: define i32 @test8
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT: [[A:%.*]] = load i32, ptr [[P]], align 4, !range [[RNG4:![0-9]+]]
+; CHECK-NEXT: [[C:%.*]] = add i32 [[A]], [[A]]
+; CHECK-NEXT: ret i32 [[C]]
+;
%a = load i32, ptr %p, !range !9
%b = load i32, ptr %p, !range !10
%c = add i32 %a, %b
ret i32 %c
}
-; CHECK: ![[RANGE0]] = !{i32 0, i32 2}
-; CHECK: ![[RANGE3]] = !{i32 -5, i32 -2}
-; CHECK: ![[RANGE5]] = !{i32 10, i32 1}
-; CHECK: ![[RANGE7]] = !{i32 1, i32 2, i32 3, i32 4}
-; CHECK: ![[RANGE9]] = !{i32 1, i32 5}
!0 = !{i32 0, i32 2}
!1 = !{i32 3, i32 5}
@@ -98,3 +117,10 @@ define i32 @test8(ptr %p) {
!8 = !{i32 5, i32 1}
!9 = !{i32 1, i32 5}
!10 = !{i32 5, i32 1}
+;.
+; CHECK: [[RNG0]] = !{i32 0, i32 2}
+; CHECK: [[RNG1]] = !{i32 -5, i32 -2}
+; CHECK: [[RNG2]] = !{i32 10, i32 1}
+; CHECK: [[RNG3]] = !{i32 1, i32 2, i32 3, i32 4}
+; CHECK: [[RNG4]] = !{i32 1, i32 5}
+;.
More information about the llvm-commits
mailing list