[PATCH] D83101: [Scalarizer] ExtractElement handling w/ constant extract index
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 07:05:33 PDT 2020
lebedev.ri added a comment.
In D83101#2223689 <https://reviews.llvm.org/D83101#2223689>, @materi wrote:
> We have seen some issues with missing symbols during linking that I think are caused by this patch. The origin of this is downstream fuzz testing.
>
> The global variable `aglobal` is renamed:
>
> $ cat global.ll
> @aglobal = dso_local global i16 0, align 1
> @b = dso_local local_unnamed_addr global i16 0, align 1
>
> define dso_local void @c() local_unnamed_addr {
> entry:
> %d.sroa.0.1.vec.extract = extractelement <4 x i16*> <i16* @aglobal, i16* @aglobal, i16* @aglobal, i16* @aglobal>, i32 1
> %0 = ptrtoint i16* %d.sroa.0.1.vec.extract to i16
> store i16 %0, i16* @b, align 1
> ret void
> }
>
> $ opt -scalarizer global.ll -S
> ; ModuleID = 'global.ll'
> source_filename = "global.ll"
>
> @d.sroa.0.1.vec.extract = dso_local global i16 0, align 1
> @b = dso_local local_unnamed_addr global i16 0, align 1
>
> define dso_local void @c() local_unnamed_addr {
> entry:
> %0 = ptrtoint i16* @d.sroa.0.1.vec.extract to i16
> store i16 %0, i16* @b, align 1
> ret void
> }
I see that the global is renamed, https://godbolt.org/z/PM95se, it's not really intentional.
But i think something else is missing in this test - what's the failure? `-verify` passes
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