[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-20 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov marked an inline comment as done. d-smirnov added a comment. updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688 ___ cfe-commits mailing list

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-20 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 557138. d-smirnov marked 3 inline comments as done. d-smirnov added a comment. Reordered and removed extra check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-20 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 557128. d-smirnov added a comment. Amended Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688 Files: clang/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-20 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2336 +// Try to reassociate loop invariant index calculations to enable LICM. +if (Idx && (Idx->getOpcode() == Instruction::Add)) { + Value *Ptr = GEP.getOperand(0);

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-20 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2332 } - + if (GEP.getNumIndices() == 1 && !GEP.getType()->isVectorTy()) { +auto *Idx = dyn_cast(GEP.getOperand(1)); Perhaps move this block after

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-18 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov added a comment. @nikic Could you check out the updated code to make sure we're on the right track before I try to fix the rest of the unit tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-16 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 556894. d-smirnov added a comment. unit test fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688 Files: clang/test/CodeGen/SystemZ/systemz-inline-asm-03.c

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-15 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 556884. d-smirnov added a comment. updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688 Files: clang/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-15 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 556881. d-smirnov added a comment. Herald added subscribers: cfe-commits, wangpc, zzheng. Herald added a project: clang. Relaxed checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/