[PATCH] D122269: Modify DXILPrepare to emit no-op bitcasts
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 07:52:36 PDT 2022
beanz added inline comments.
================
Comment at: llvm/lib/Target/DirectX/DXILPrepare.cpp:137-142
+ auto It = PointerTypes.find(Inst->getPointerOperand());
+ if (It != PointerTypes.end()) {
+ if (cast<TypedPointerType>(It->second)->getElementType() ==
+ Inst->getValueOperand()->getType())
+ continue;
+ }
----------------
python3kgae wrote:
> Could we have shouldOmit function and createNoOpBitcast function? The same code happened 3 times.
>
The code here is actually not the same in all three places. The first two are super similar except that Inst is different types in both cases. The third is different because the interfaces for GEP instructions aren't the same.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122269/new/
https://reviews.llvm.org/D122269
More information about the llvm-commits
mailing list