[PATCH] D136524: [InstCombine] Handle select inst when eliminating constant memcpy
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 02:03:49 PST 2023
nikic requested changes to this revision.
nikic added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:82
}
- if (isa<BitCastInst>(I) || isa<AddrSpaceCastInst>(I)) {
+ if (isa<BitCastInst, AddrSpaceCastInst, SelectInst>(I)) {
// If uses of the bitcast are ok, we are ok.
----------------
Handling for SelectInst should use same logic as PHINode (with IsOffset = true). Can you please add a test with a memcpy on the select result, which should not get transformed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136524/new/
https://reviews.llvm.org/D136524
More information about the llvm-commits
mailing list