[PATCH] D97676: [DSE] Extending isOverwrite to support offsetted fully overlapping stores

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 08:22:24 PST 2021


dfukalov added a comment.

In D97676#2594791 <https://reviews.llvm.org/D97676#2594791>, @fvrmatteo wrote:

> I noticed @dfukalov planned to fix the DSE after their patch, so I'm not sure if I should delete mine, as their fixes/improvements may be covering more cases compared to my isolated test file.

I planned to work on DSE after GVN (eliminating redundant loads).
It seems these two fixes may be independent, but you can check my GVN approach in the diff: https://reviews.llvm.org/D93529?id=313082.
My test case for DSE fix is

  define void @foo(float* %arg, i32 %i) {
  bb:
    %i7 = add nuw nsw i32 %i, 1
    %i8 = zext i32 %i7 to i64
    %i9 = getelementptr inbounds float, float* %arg, i64 %i8
    store float undef, float* %i9, align 4
  
    %i2 = zext i32 %i to i64
    %i3 = getelementptr inbounds float, float* %arg, i64 %i2
    %i4 = bitcast float* %i3 to <2 x float>*
    store <2 x float> <float undef, float undef>, <2 x float>* %i4, align 16
  
    ret void
  }

and suggest to add it to the patch since it uses vector types instead of arrays.


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

https://reviews.llvm.org/D97676



More information about the llvm-commits mailing list