[PATCH] D83101: [Scalarizer] ExtractElement handling w/ constant extract index
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 15:13:48 PDT 2020
lebedev.ri added a comment.
In D83101#2134056 <https://reviews.llvm.org/D83101#2134056>, @lebedev.ri wrote:
> In D83101#2133062 <https://reviews.llvm.org/D83101#2133062>, @foad wrote:
>
> > @lebedev.ri this is causing assertion failures and verification failures in some of our downstream tests. Here's a test case:
> >
> > $ cat reduced.ll
> > define void @main(<3 x i32> inreg %w) {
> > entry:
> > %a = extractelement <3 x i32> undef, i32 0
> > %b = extractelement <3 x i32> undef, i32 1
> > %x = extractelement <3 x i32> %w, i32 2
> > %y = insertelement <4 x i32> undef, i32 %x, i32 2
> > %z = insertelement <4 x i32> %y, i32 undef, i32 3
> > store <4 x i32> %z, <4 x i32> addrspace(7)* undef, align 16
> > ret void
> > }
> > $ ~/llvm-debug/bin/opt -scalarizer -o /dev/null reduced.ll
> > Instruction does not dominate all uses!
> > <badref> = extractelement [145938144 x half] <badref>, i32 undef
> > %z.upto2 = insertelement <4 x i32> undef, i32 <badref>, i32 2
> > in function main
> > LLVM ERROR: Broken function found, compilation aborted!
> >
>
>
> Thanks for test case, looking.
Thank you for a great reproducer! Fixed in rGdb05f2e34a5e9380ddcc199d6687531108d795e4 <https://reviews.llvm.org/rGdb05f2e34a5e9380ddcc199d6687531108d795e4>.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83101/new/
https://reviews.llvm.org/D83101
More information about the llvm-commits
mailing list