[PATCH] D89701: Fix TypeSize warning in redundant store elimination
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 07:49:23 PDT 2020
sdesmalen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17328
// of a vector, so bail out if MemoryVT is scalable.
+ !ST->getMemoryVT().isScalableVector() &&
!ST1->getMemoryVT().isScalableVector()) {
----------------
Now that we have the isKnownGE functions in TypeSize, it should be possible to check if the second store is greater than the first one, and if so, still mark the first one as redundant. But that may be more something to move into `BaseIndexOffset::contains` instead, and probably not something to do in this patch.
================
Comment at: llvm/test/CodeGen/AArch64/Redundantstore.ll:1
-; RUN: llc < %s -O3 -mtriple=aarch64-eabi | FileCheck %s
+; RUN: llc < %s -O3 -mtriple=aarch64-eabi 2>&1 | FileCheck %s
----------------
In other tests we've done this with:
```; RUN: llc [commands here] < %s 2>%t | FileCheck %s
; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t```
With a reference to some README file in case people run into this failure:
```; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it.
; WARN-NOT: warning```
================
Comment at: llvm/test/CodeGen/AArch64/Redundantstore.ll:38
+; CHECK-LABEL: @redundant_store
+define void @redundant_store(i32* nocapture %x) local_unnamed_addr #0 {
+ %1 = bitcast i32* %x to <vscale x 4 x i32>*
----------------
Missing CHECK lines to check that the optimisation is not applied?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89701/new/
https://reviews.llvm.org/D89701
More information about the llvm-commits
mailing list