Remove insertelement, if we don't use the inserted element.
extractelement (bitcast (insertelement (Vec, b)), a) -> extractelement (bitcast (Vec), a)
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
'SimplifyDemandedVectorElts' cannot support scalable vector type now, and it seems to be no need to break this setting.
Comment Actions
In which case, we need a FIXME comment explaining that this should be removed once scale vectors are supported
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | ||
---|---|---|
250 | Are there tests for multiuse? | |
llvm/test/Transforms/InstCombine/vscale_extractelement-inseltpoison.ll | ||
47–48 | technically its not a wrong insert - 'useless' might be a better term! | |
llvm/test/Transforms/InstCombine/vscale_extractelement.ll | ||
43–44 | technically its not a wrong insert - 'useless' might be a better term! |
Comment Actions
LGTM - but please add back the FIXME that you're lost in the rebase
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | ||
---|---|---|
248 | Add back the FIXME |
Add back the FIXME