[PATCH] D129297: [LSR] Fix bug - check if loop has preheader before calling isInductionPHI
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 11:30:15 PDT 2022
nickdesaulniers added inline comments.
================
Comment at: llvm/test/Transforms/LoopStrengthReduce/remove_scev_indvars.ll:97-123
+%struct.kernfs_node = type { %struct.kernfs_node* }
+
+ at kernfs_path_from_node_locked_kn_to = dso_local local_unnamed_addr global %struct.kernfs_node zeroinitializer, align 8
+ at kernfs_path_from_node_locked___trans_tmp_1 = dso_local local_unnamed_addr global i32 0, align 4
+
+define dso_local void @kernfs_path_from_node() {
+entry:
----------------
via llvm-reduce, I was able to reduce this test case to:
```
define void @kernfs_path_from_node() {
entry:
callbr void asm sideeffect "", "i"(i8* blockaddress(@kernfs_path_from_node, %while.body))
to label %asm.fallthrough [label %while.body]
asm.fallthrough: ; preds = %entry
br label %while.body
while.body: ; preds = %while.body, %asm.fallthrough, %entry
%depth.04 = phi i32 [ %inc, %while.body ], [ 0, %asm.fallthrough ], [ 0, %entry ]
%inc = add i32 %depth.04, 1
br i1 false, label %while.end, label %while.body
while.end: ; preds = %while.body
%inc.lcssa = phi i32 [ %depth.04, %while.body ]
store i32 %inc.lcssa, i32* null, align 4
ret void
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129297/new/
https://reviews.llvm.org/D129297
More information about the llvm-commits
mailing list