[llvm] fb4a836 - [NewGVN] Regenerate test checks (NFC)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 09:25:52 PDT 2023
Author: ManuelJBrito
Date: 2023-07-26T17:24:39+01:00
New Revision: fb4a836b5c8513a7d40d82b4d5d0f546d2a354f4
URL: https://github.com/llvm/llvm-project/commit/fb4a836b5c8513a7d40d82b4d5d0f546d2a354f4
DIFF: https://github.com/llvm/llvm-project/commit/fb4a836b5c8513a7d40d82b4d5d0f546d2a354f4.diff
LOG: [NewGVN] Regenerate test checks (NFC)
Regenerate some test checks in preparation for a patch that
fixes https://github.com/llvm/llvm-project/issues/53218.
Added:
Modified:
llvm/test/Transforms/NewGVN/flags.ll
llvm/test/Transforms/NewGVN/pr12979.ll
llvm/test/Transforms/NewGVN/propagate-ir-flags.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/NewGVN/flags.ll b/llvm/test/Transforms/NewGVN/flags.ll
index 20730599fb2260..b8b49a34328032 100644
--- a/llvm/test/Transforms/NewGVN/flags.ll
+++ b/llvm/test/Transforms/NewGVN/flags.ll
@@ -1,8 +1,17 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -passes=newgvn -S < %s | FileCheck %s
declare void @use(i1)
define void @test1(float %x, float %y) {
+; CHECK-LABEL: define void @test1
+; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP1:%.*]] = fcmp oeq float [[Y]], [[X]]
+; CHECK-NEXT: call void @use(i1 [[CMP1]])
+; CHECK-NEXT: call void @use(i1 [[CMP1]])
+; CHECK-NEXT: ret void
+;
entry:
%cmp1 = fcmp nnan oeq float %y, %x
%cmp2 = fcmp oeq float %x, %y
@@ -10,9 +19,3 @@ entry:
call void @use(i1 %cmp2)
ret void
}
-
-; CHECK-LABEL: define void @test1(
-; CHECK: %[[cmp:.*]] = fcmp oeq float %y, %x
-; CHECK-NEXT: call void @use(i1 %[[cmp]])
-; CHECK-NEXT: call void @use(i1 %[[cmp]])
-; CHECK-NEXT: ret void
diff --git a/llvm/test/Transforms/NewGVN/pr12979.ll b/llvm/test/Transforms/NewGVN/pr12979.ll
index 70c2323420e385..a63fb9a0104c14 100644
--- a/llvm/test/Transforms/NewGVN/pr12979.ll
+++ b/llvm/test/Transforms/NewGVN/pr12979.ll
@@ -1,9 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -passes=newgvn -S < %s | FileCheck %s
define i32 @test1(i32 %x, i32 %y) {
-; CHECK: @test1(i32 %x, i32 %y)
-; CHECK: %add1 = add i32 %x, %y
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test1
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add nsw i32 %x, %y
%add2 = add i32 %x, %y
@@ -12,9 +16,12 @@ define i32 @test1(i32 %x, i32 %y) {
}
define i32 @test2(i32 %x, i32 %y) {
-; CHECK: @test2(i32 %x, i32 %y)
-; CHECK: %add1 = add i32 %x, %y
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test2
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add nuw i32 %x, %y
%add2 = add i32 %x, %y
@@ -23,9 +30,12 @@ define i32 @test2(i32 %x, i32 %y) {
}
define i32 @test3(i32 %x, i32 %y) {
-; CHECK: @test3(i32 %x, i32 %y)
-; CHECK: %add1 = add i32 %x, %y
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test3
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add nuw nsw i32 %x, %y
%add2 = add i32 %x, %y
@@ -34,9 +44,12 @@ define i32 @test3(i32 %x, i32 %y) {
}
define i32 @test4(i32 %x, i32 %y) {
-; CHECK: @test4(i32 %x, i32 %y)
-; CHECK: %add1 = add nsw i32 %x, %y
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test4
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add nsw i32 %x, %y
%add2 = add nsw i32 %x, %y
@@ -45,9 +58,12 @@ define i32 @test4(i32 %x, i32 %y) {
}
define i32 @test5(i32 %x, i32 %y) {
-; CHECK: @test5(i32 %x, i32 %y)
-; CHECK: %add1 = add i32 %x, %y
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test5
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add nuw i32 %x, %y
%add2 = add nsw i32 %x, %y
@@ -56,9 +72,12 @@ define i32 @test5(i32 %x, i32 %y) {
}
define i32 @test6(i32 %x, i32 %y) {
-; CHECK: @test6(i32 %x, i32 %y)
-; CHECK: %add1 = add nsw i32 %x, %y
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test6
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add nuw nsw i32 %x, %y
%add2 = add nsw i32 %x, %y
@@ -67,10 +86,12 @@ define i32 @test6(i32 %x, i32 %y) {
}
define i32 @test7(i32 %x, i32 %y) {
-; CHECK: @test7(i32 %x, i32 %y)
-; CHECK: %add1 = add i32 %x, %y
-; CHECK-NOT: what_is_this
-; CHECK: %foo = add i32 %add1, %add1
+; CHECK-LABEL: define i32 @test7
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[ADD1:%.*]] = add i32 [[X]], [[Y]]
+; CHECK-NEXT: [[FOO:%.*]] = add i32 [[ADD1]], [[ADD1]]
+; CHECK-NEXT: ret i32 [[FOO]]
+;
%add1 = add i32 %x, %y, !what_is_this !{}
%add2 = add i32 %x, %y
@@ -81,10 +102,12 @@ define i32 @test7(i32 %x, i32 %y) {
declare void @mumble(i2, i2)
define void @test8(i2 %x) {
-; CHECK-LABEL: @test8(
-; CHECK: %[[ashr:.*]] = ashr i2 %x, 1
-; CHECK-NEXT: call void @mumble(i2 %[[ashr]], i2 %[[ashr]])
-; CHECK-NEXT: ret void
+; CHECK-LABEL: define void @test8
+; CHECK-SAME: (i2 [[X:%.*]]) {
+; CHECK-NEXT: [[ASHR0:%.*]] = ashr i2 [[X]], 1
+; CHECK-NEXT: call void @mumble(i2 [[ASHR0]], i2 [[ASHR0]])
+; CHECK-NEXT: ret void
+;
%ashr0 = ashr exact i2 %x, 1
%ashr1 = ashr i2 %x, 1
diff --git a/llvm/test/Transforms/NewGVN/propagate-ir-flags.ll b/llvm/test/Transforms/NewGVN/propagate-ir-flags.ll
index fa119c9b34b49a..648d048d375120 100644
--- a/llvm/test/Transforms/NewGVN/propagate-ir-flags.ll
+++ b/llvm/test/Transforms/NewGVN/propagate-ir-flags.ll
@@ -1,10 +1,15 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt < %s -passes=newgvn -S | FileCheck %s
-; CHECK-LABEL: func_fast
-; CHECK: fadd fast double
-; CHECK-NEXT: store
-; CHECK-NEXT: ret
define double @func_fast(double %a, double %b) {
+; CHECK-LABEL: define double @func_fast
+; CHECK-SAME: (double [[A:%.*]], double [[B:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[A_ADDR:%.*]] = alloca double, align 8
+; CHECK-NEXT: [[ADD:%.*]] = fadd fast double [[B]], 3.000000e+00
+; CHECK-NEXT: store double [[ADD]], ptr [[A_ADDR]], align 8
+; CHECK-NEXT: ret double [[ADD]]
+;
entry:
%a.addr = alloca double, align 8
%add = fadd fast double %b, 3.000000e+00
@@ -13,11 +18,15 @@ entry:
ret double %load_add
}
-; CHECK-LABEL: func_no_fast
-; CHECK: fadd double
-; CHECK-NEXT: store
-; CHECK-NEXT: ret
define double @func_no_fast(double %a, double %b) {
+; CHECK-LABEL: define double @func_no_fast
+; CHECK-SAME: (double [[A:%.*]], double [[B:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[A_ADDR:%.*]] = alloca double, align 8
+; CHECK-NEXT: [[ADD:%.*]] = fadd double [[B]], 3.000000e+00
+; CHECK-NEXT: store double [[ADD]], ptr [[A_ADDR]], align 8
+; CHECK-NEXT: ret double [[ADD]]
+;
entry:
%a.addr = alloca double, align 8
%add = fadd fast double %b, 3.000000e+00
More information about the llvm-commits
mailing list