[llvm] 1de6866 - [NewGVN] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 03:43:15 PDT 2023
Author: Nikita Popov
Date: 2023-04-21T12:43:05+02:00
New Revision: 1de68667eb66b988897f4169979c0a7a315a4018
URL: https://github.com/llvm/llvm-project/commit/1de68667eb66b988897f4169979c0a7a315a4018
DIFF: https://github.com/llvm/llvm-project/commit/1de68667eb66b988897f4169979c0a7a315a4018.diff
LOG: [NewGVN] Regenerate test checks (NFC)
Added:
Modified:
llvm/test/Transforms/NewGVN/2007-07-26-InterlockingLoops.ll
llvm/test/Transforms/NewGVN/non-local-offset.ll
llvm/test/Transforms/NewGVN/refine-stores.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/NewGVN/2007-07-26-InterlockingLoops.ll b/llvm/test/Transforms/NewGVN/2007-07-26-InterlockingLoops.ll
index eef604d25543e..4b1ec382566c0 100644
--- a/llvm/test/Transforms/NewGVN/2007-07-26-InterlockingLoops.ll
+++ b/llvm/test/Transforms/NewGVN/2007-07-26-InterlockingLoops.ll
@@ -1,40 +1,58 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -opaque-pointers=0 < %s -passes=newgvn -S | FileCheck %s
@last = external global [65 x i32*]
define i32 @NextRootMove(i32 %wtm, i32 %x, i32 %y, i32 %z) {
+; CHECK-LABEL: define i32 @NextRootMove
+; CHECK-SAME: (i32 [[WTM:%.*]], i32 [[X:%.*]], i32 [[Y:%.*]], i32 [[Z:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[A:%.*]] = alloca i32*, align 8
+; CHECK-NEXT: [[TMP17618:%.*]] = load i32*, i32** getelementptr inbounds ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
+; CHECK-NEXT: store i32* [[TMP17618]], i32** [[A]], align 8
+; CHECK-NEXT: br label [[COND_TRUE116:%.*]]
+; CHECK: cond_true116:
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[X]], [[Y]]
+; CHECK-NEXT: br i1 [[CMP]], label [[COND_TRUE128:%.*]], label [[COND_TRUE145:%.*]]
+; CHECK: cond_true128:
+; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 [[X]], [[Z]]
+; CHECK-NEXT: br i1 [[CMP1]], label [[BB98_BACKEDGE:%.*]], label [[RETURN_LOOPEXIT:%.*]]
+; CHECK: bb98.backedge:
+; CHECK-NEXT: br label [[COND_TRUE116]]
+; CHECK: cond_true145:
+; CHECK-NEXT: br i1 false, label [[BB98_BACKEDGE]], label [[RETURN_LOOPEXIT]]
+; CHECK: return.loopexit:
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: return:
+; CHECK-NEXT: ret i32 0
+;
entry:
- %A = alloca i32*
- %tmp17618 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
- store i32* %tmp17618, i32** %A
-; CHECK: entry:
-; CHECK-NEXT: alloca i32
-; CHECK-NEXT: %tmp17618 = load
-; CHECK-NOT: load
-; CHECK-NOT: phi
- br label %cond_true116
+ %A = alloca i32*
+ %tmp17618 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
+ store i32* %tmp17618, i32** %A
+ br label %cond_true116
cond_true116:
- %cmp = icmp eq i32 %x, %y
- br i1 %cmp, label %cond_true128, label %cond_true145
+ %cmp = icmp eq i32 %x, %y
+ br i1 %cmp, label %cond_true128, label %cond_true145
cond_true128:
- %tmp17625 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
- store i32* %tmp17625, i32** %A
- %cmp1 = icmp eq i32 %x, %z
- br i1 %cmp1 , label %bb98.backedge, label %return.loopexit
+ %tmp17625 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
+ store i32* %tmp17625, i32** %A
+ %cmp1 = icmp eq i32 %x, %z
+ br i1 %cmp1 , label %bb98.backedge, label %return.loopexit
bb98.backedge:
- br label %cond_true116
+ br label %cond_true116
cond_true145:
- %tmp17631 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
- store i32* %tmp17631, i32** %A
- br i1 false, label %bb98.backedge, label %return.loopexit
+ %tmp17631 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
+ store i32* %tmp17631, i32** %A
+ br i1 false, label %bb98.backedge, label %return.loopexit
return.loopexit:
- br label %return
+ br label %return
return:
- ret i32 0
+ ret i32 0
}
diff --git a/llvm/test/Transforms/NewGVN/non-local-offset.ll b/llvm/test/Transforms/NewGVN/non-local-offset.ll
index e1fbe50b55667..5cca68eff565b 100644
--- a/llvm/test/Transforms/NewGVN/non-local-offset.ll
+++ b/llvm/test/Transforms/NewGVN/non-local-offset.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -opaque-pointers=0 -passes=newgvn -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64"
@@ -5,12 +6,20 @@ target datalayout = "e-p:64:64:64"
; GVN should ignore the store to p[1] to see that the load from p[0] is
; fully redundant.
-; CHECK-LABEL: @yes(
-; CHECK: if.then:
-; CHECK-NEXT: store i32 0, i32* %q
-; CHECK-NEXT: ret void
-
define void @yes(i1 %c, i32* %p, i32* %q) nounwind {
+; CHECK-LABEL: define void @yes
+; CHECK-SAME: (i1 [[C:%.*]], i32* [[P:%.*]], i32* [[Q:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: store i32 0, i32* [[P]], align 4
+; CHECK-NEXT: [[P1:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 1
+; CHECK-NEXT: store i32 1, i32* [[P1]], align 4
+; CHECK-NEXT: br i1 [[C]], label [[IF_ELSE:%.*]], label [[IF_THEN:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: store i32 0, i32* [[Q]], align 4
+; CHECK-NEXT: ret void
+; CHECK: if.else:
+; CHECK-NEXT: ret void
+;
entry:
store i32 0, i32* %p
%p1 = getelementptr inbounds i32, i32* %p, i64 1
@@ -30,15 +39,24 @@ if.else:
; fully redundant. However, the second load is larger, so it's not a simple
; redundancy.
-; CHECK-LABEL: @watch_out_for_size_change(
-; CHECK: if.then:
-; CHECK-NEXT: store i32 0, i32* %q
-; CHECK-NEXT: ret void
-; CHECK: if.else:
-; CHECK: load i64, i64* %pc
-; CHECK: store i64
-
define void @watch_out_for_size_change(i1 %c, i32* %p, i32* %q) nounwind {
+; CHECK-LABEL: define void @watch_out_for_size_change
+; CHECK-SAME: (i1 [[C:%.*]], i32* [[P:%.*]], i32* [[Q:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: store i32 0, i32* [[P]], align 4
+; CHECK-NEXT: [[P1:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 1
+; CHECK-NEXT: store i32 1, i32* [[P1]], align 4
+; CHECK-NEXT: br i1 [[C]], label [[IF_ELSE:%.*]], label [[IF_THEN:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: store i32 0, i32* [[Q]], align 4
+; CHECK-NEXT: ret void
+; CHECK: if.else:
+; CHECK-NEXT: [[PC:%.*]] = bitcast i32* [[P]] to i64*
+; CHECK-NEXT: [[QC:%.*]] = bitcast i32* [[Q]] to i64*
+; CHECK-NEXT: [[T64:%.*]] = load i64, i64* [[PC]], align 4
+; CHECK-NEXT: store i64 [[T64]], i64* [[QC]], align 4
+; CHECK-NEXT: ret void
+;
entry:
store i32 0, i32* %p
%p1 = getelementptr inbounds i32, i32* %p, i64 1
diff --git a/llvm/test/Transforms/NewGVN/refine-stores.ll b/llvm/test/Transforms/NewGVN/refine-stores.ll
index a5ed453203ce9..878392ea200fe 100644
--- a/llvm/test/Transforms/NewGVN/refine-stores.ll
+++ b/llvm/test/Transforms/NewGVN/refine-stores.ll
@@ -15,7 +15,7 @@ define void @spam(i32 *%a) {
; CHECK-LABEL: @spam(
; CHECK-NEXT: bb:
; CHECK-NEXT: [[FOO:%.*]] = bitcast i32* [[A:%.*]] to %struct.eggs**
-; CHECK-NEXT: store %struct.eggs* null, %struct.eggs** [[FOO]]
+; CHECK-NEXT: store %struct.eggs* null, %struct.eggs** [[FOO]], align 8
; CHECK-NEXT: br label [[BB1:%.*]]
; CHECK: bb1:
; CHECK-NEXT: br i1 undef, label [[BB3:%.*]], label [[BB2:%.*]]
@@ -23,8 +23,8 @@ define void @spam(i32 *%a) {
; CHECK-NEXT: call void @baz()
; CHECK-NEXT: br label [[BB1]]
; CHECK: bb3:
-; CHECK-NEXT: store i32 0, i32* undef
-; CHECK-NEXT: store %struct.eggs* null, %struct.eggs** [[FOO]]
+; CHECK-NEXT: store i32 0, i32* undef, align 4
+; CHECK-NEXT: store %struct.eggs* null, %struct.eggs** [[FOO]], align 8
; CHECK-NEXT: unreachable
;
bb:
@@ -58,11 +58,11 @@ define void @a() {
; CHECK-NEXT: b:
; CHECK-NEXT: br label [[C:%.*]]
; CHECK: c:
-; CHECK-NEXT: store i64 undef, i64* null
+; CHECK-NEXT: store i64 undef, i64* null, align 4
; CHECK-NEXT: br label [[E:%.*]]
; CHECK: e:
-; CHECK-NEXT: [[G:%.*]] = load i64*, i64** null
-; CHECK-NEXT: store i64* undef, i64** null
+; CHECK-NEXT: [[G:%.*]] = load i64*, i64** null, align 8
+; CHECK-NEXT: store i64* undef, i64** null, align 8
; CHECK-NEXT: br i1 undef, label [[C]], label [[E]]
;
b:
@@ -90,16 +90,16 @@ define void @widget(%struct.hoge* %arg) {
; CHECK-NEXT: br label [[BB1:%.*]]
; CHECK: bb1:
; CHECK-NEXT: [[TMP:%.*]] = phi %struct.hoge* [ [[ARG:%.*]], [[BB:%.*]] ], [ null, [[BB1]] ]
-; CHECK-NEXT: store %struct.hoge* [[TMP]], %struct.hoge** undef
+; CHECK-NEXT: store %struct.hoge* [[TMP]], %struct.hoge** undef, align 8
; CHECK-NEXT: br i1 undef, label [[BB1]], label [[BB2:%.*]]
; CHECK: bb2:
; CHECK-NEXT: [[TMP3:%.*]] = phi i64 [ [[TMP8:%.*]], [[BB7:%.*]] ], [ 0, [[BB1]] ]
; CHECK-NEXT: [[TMP4:%.*]] = icmp eq i64 [[TMP3]], 0
; CHECK-NEXT: br i1 [[TMP4]], label [[BB7]], label [[BB5:%.*]]
; CHECK: bb5:
-; CHECK-NEXT: [[TMP6:%.*]] = load i64, i64* null
+; CHECK-NEXT: [[TMP6:%.*]] = load i64, i64* null, align 4
; CHECK-NEXT: call void @quux()
-; CHECK-NEXT: store i64 [[TMP6]], i64* undef
+; CHECK-NEXT: store i64 [[TMP6]], i64* undef, align 4
; CHECK-NEXT: br label [[BB7]]
; CHECK: bb7:
; CHECK-NEXT: [[TMP8]] = add i64 [[TMP3]], 1
@@ -137,14 +137,14 @@ declare void @quux()
define void @b() {
; CHECK-LABEL: @b(
-; CHECK-NEXT: [[C:%.*]] = alloca [[STRUCT_A:%.*]]
+; CHECK-NEXT: [[C:%.*]] = alloca [[STRUCT_A:%.*]], align 8
; CHECK-NEXT: br label [[D:%.*]]
; CHECK: m:
; CHECK-NEXT: unreachable
; CHECK: d:
; CHECK-NEXT: [[G:%.*]] = bitcast %struct.a* [[C]] to i8*
; CHECK-NEXT: [[F:%.*]] = bitcast i8* [[G]] to i32*
-; CHECK-NEXT: [[E:%.*]] = load i32, i32* [[F]]
+; CHECK-NEXT: [[E:%.*]] = load i32, i32* [[F]], align 4
; CHECK-NEXT: br i1 undef, label [[I:%.*]], label [[J:%.*]]
; CHECK: i:
; CHECK-NEXT: br i1 undef, label [[K:%.*]], label [[M:%.*]]
More information about the llvm-commits
mailing list