[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 07:03:44 PDT 2021


thopre updated this revision to Diff 334157.
thopre added a comment.

Add fix for GVN/PRE/load-pre-nonlocal.ll


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99581/new/

https://reviews.llvm.org/D99581

Files:
  llvm/test/Transforms/GVN/PRE/load-pre-nonlocal.ll
  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
Index: llvm/test/Transforms/GVN/PRE/load-pre-nonlocal.ll
===================================================================
--- llvm/test/Transforms/GVN/PRE/load-pre-nonlocal.ll
+++ llvm/test/Transforms/GVN/PRE/load-pre-nonlocal.ll
@@ -56,11 +56,8 @@
 ; CHECK-LABEL: define i32 @overaligned_load
 ; CHECK: if.then:
 ; CHECK-NOT:   %0 = load i64
-; CHECK-NOT:   [[LSHR:%[0-9]+]] = lshr i64 %0, 32, !dbg [[LSHR_LOC:![0-9]+]]
-; CHECK-NOT:   trunc i64 [[LSHR]] to i32
 ; CHECK: if.end:
 ; CHECK: %1 = load i32, i32*
-; CHECK-NOT: [[LSHR_LOC]] = !DILocation(line: 101, column: 1, scope: !{{.*}})
 
 define i32 @overaligned_load(i32 %a, i32* nocapture %b) !dbg !13 {
 entry:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99581.334157.patch
Type: text/x-patch
Size: 2042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/303c5268/attachment.bin>


More information about the llvm-commits mailing list