[PATCH] D114958: [SLP]Fix reused extracts cost.
Qiongsi Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 7 07:28:56 PST 2021
qiongsiwu1 added subscribers: RolandF, qiongsiwu1.
qiongsiwu1 added a comment.
This patch causes a crash when compiling the IR below.
define dso_local void @foo() local_unnamed_addr {
entry:
%0 = extractelement <2 x double> undef, i32 1
br label %loop_do_
loop_do_:
%a1 = phi double [ %a1, %loop_do_ ], [ %0, %entry ]
%a2 = phi double [ undef, %loop_do_ ], [ undef, %entry ]
br label %loop_do_
}
The patch moved the `isSlat(VL)` check after we process `ExtractValue`, but this test case has a tree where one value is `undef`, and the other is an `extractvalue`. Should we match not only `isa<ExtractElementInst, UndefValue>(V)`, but also an undef value itself as well?
Thanks a lot! FYI @RolandF
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114958/new/
https://reviews.llvm.org/D114958
More information about the llvm-commits
mailing list