From ab86e64a96624e99df2f2e6183aef5fe7b2a081a Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 4 Sep 2020 09:39:40 +0100 Subject: [PATCH] [DSE] Remove some dead code from DSE tests. Some tests depend on DSE removing dead instructions unrelated to any memory optimization. That's not really DSE's job, remove it. --- llvm/test/Transforms/DeadStoreElimination/memintrinsics.ll | 2 -- .../Transforms/DeadStoreElimination/merge-stores-big-endian.ll | 1 - llvm/test/Transforms/DeadStoreElimination/merge-stores.ll | 1 - 3 files changed, 4 deletions(-) diff --git a/llvm/test/Transforms/DeadStoreElimination/memintrinsics.ll b/llvm/test/Transforms/DeadStoreElimination/memintrinsics.ll index 68943d383ba6..290271237693 100644 --- a/llvm/test/Transforms/DeadStoreElimination/memintrinsics.ll +++ b/llvm/test/Transforms/DeadStoreElimination/memintrinsics.ll @@ -38,7 +38,6 @@ define void @test3() { ; CHECK-NEXT: ret void ; %A = alloca i8 - %B = alloca i8 store i8 0, i8* %A ;; Written to by memset @@ -87,7 +86,6 @@ define void @test6() { ; CHECK-NEXT: ret void ; %A = alloca i16, i16 1024, align 2 - %B = alloca i16, i16 1024, align 2 store atomic i16 0, i16* %A unordered, align 2 ;; Written to by memset diff --git a/llvm/test/Transforms/DeadStoreElimination/merge-stores-big-endian.ll b/llvm/test/Transforms/DeadStoreElimination/merge-stores-big-endian.ll index 8d44855f2f97..77784ac0c404 100644 --- a/llvm/test/Transforms/DeadStoreElimination/merge-stores-big-endian.ll +++ b/llvm/test/Transforms/DeadStoreElimination/merge-stores-big-endian.ll @@ -40,7 +40,6 @@ entry: %wptr = bitcast i64* %ptr to i16* %wptr1 = getelementptr inbounds i16, i16* %wptr, i64 1 - %wptr2 = getelementptr inbounds i16, i16* %wptr, i64 2 %wptr3 = getelementptr inbounds i16, i16* %wptr, i64 3 ;; We should be able to merge these two stores with the i64 one above diff --git a/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll b/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll index c7f86ab29e3e..095ad9d8530c 100644 --- a/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll +++ b/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll @@ -39,7 +39,6 @@ entry: %wptr = bitcast i64* %ptr to i16* %wptr1 = getelementptr inbounds i16, i16* %wptr, i64 1 - %wptr2 = getelementptr inbounds i16, i16* %wptr, i64 2 %wptr3 = getelementptr inbounds i16, i16* %wptr, i64 3 ;; We should be able to merge these two stores with the i64 one above