[PATCH] D103959: [LoopDeletion] Handle Phis with similar inputs from different block
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 21:52:28 PDT 2021
mkazantsev added a comment.
Ok, we stepped on a loop that doesn't have a predecessor (I didn't even know it's possible). Reduced IR repro:
opt -S -loop-deletion
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-gnu"
define dso_local i32 @hoge() local_unnamed_addr #0 {
bb:
callbr void asm sideeffect "", "X"(i8* blockaddress(@hoge, %bb2)) #1
to label %bb1 [label %bb2]
bb1: ; preds = %bb
br label %bb2
bb2: ; preds = %bb2, %bb1, %bb
%tmp = phi i32 [ undef, %bb1 ], [ %tmp3, %bb2 ], [ undef, %bb ]
%tmp3 = tail call i32 bitcast (i32 (...)* @widget to i32 (i32)*)(i32 %tmp) #1
br label %bb2
}
declare dso_local i32 @widget(...) local_unnamed_addr #0
Failure was exposed, but no caused by this patch. I will land a fix and then return this one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103959/new/
https://reviews.llvm.org/D103959
More information about the llvm-commits
mailing list