[PATCH] D99581: [test, GVN] Fix use of var defined in CHECK-NOT
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 30 05:41:26 PDT 2021
thopre created this revision.
thopre added reviewers: danielcdh, reames, uweigand, chandlerc, davidxl, hfinkel, dberlin, sanjoy.
Herald added a subscriber: Prazek.
thopre requested review of this revision.
Herald added a project: LLVM.
Commit 22ce5eb051591b828b1ce4238624b6e95d334a5b, changed checks in
GVN/big-endian.ll into CHECK-NOT. The intent was to check that a
succession of lines does not occur but each CHECK-NOT is checked
independently. In other word, one CHECK-NOT uses a variable defined
in a pattern (the one defining the variable) that should not occur in
the input. The bug was then copied over in NewGVN/big-endian.ll.
This commit only checks for the absence of i16 load which rules out the
presence of the whole sequence and does not involve an undefined
variable.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99581
Files:
llvm/test/Transforms/GVN/big-endian.ll
llvm/test/Transforms/NewGVN/big-endian.ll
Index: llvm/test/Transforms/NewGVN/big-endian.ll
===================================================================
--- llvm/test/Transforms/NewGVN/big-endian.ll
+++ llvm/test/Transforms/NewGVN/big-endian.ll
@@ -7,9 +7,7 @@
;; loads reusing a load value.
define i64 @test1({ i1, i8 }* %predA, { i1, i8 }* %predB) {
; CHECK-LABEL: @test1
-; CHECK-NOT: [[V1:%.*]] = load i16, i16* %{{.*}}
-; CHECK-NOT: [[V2:%.*]] = lshr i16 [[V1]], 8
-; CHECK-NOT: trunc i16 [[V2]] to i1
+; CHECK-NOT: %{{.*}} = load i16, i16* %{{.*}}
%valueLoadA.fca.0.gep = getelementptr inbounds { i1, i8 }, { i1, i8 }* %predA, i64 0, i32 0
%valueLoadA.fca.0.load = load i1, i1* %valueLoadA.fca.0.gep, align 8
Index: llvm/test/Transforms/GVN/big-endian.ll
===================================================================
--- llvm/test/Transforms/GVN/big-endian.ll
+++ llvm/test/Transforms/GVN/big-endian.ll
@@ -7,9 +7,7 @@
;; loads reusing a load value.
define i64 @test1({ i1, i8 }* %predA, { i1, i8 }* %predB) {
; CHECK-LABEL: @test1
-; CHECK-NOT: [[V1:%.*]] = load i16, i16* %{{.*}}
-; CHECK-NOT: [[V2:%.*]] = lshr i16 [[V1]], 8
-; CHECK-NOT: trunc i16 [[V2]] to i1
+; CHECK-NOT: %{{.*}} = load i16, i16* %{{.*}}
%valueLoadA.fca.0.gep = getelementptr inbounds { i1, i8 }, { i1, i8 }* %predA, i64 0, i32 0
%valueLoadA.fca.0.load = load i1, i1* %valueLoadA.fca.0.gep, align 8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99581.334121.patch
Type: text/x-patch
Size: 1371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/8852f465/attachment.bin>
More information about the llvm-commits
mailing list