[PATCH] D152541: [InstCombine][CGP] Move swapMayExposeCSEOpportunities() fold

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 02:49:06 PDT 2023


nikic updated this revision to Diff 531667.
nikic retitled this revision from "[InstCombine] Remove swapMayExposeCSEOpportunities() fold" to "[InstCombine][CGP] Move swapMayExposeCSEOpportunities() fold".
nikic edited the summary of this revision.
nikic added a comment.
Herald added subscribers: luke, pcwang-thead, frasercrmck, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, dmgreen, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb.

Move the fold to CGP instead of removing it entirely. cmp_sub_different_order shows the desired outcome for cross-BB cmp/sub reuse. All other test changes are noise.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152541/new/

https://reviews.llvm.org/D152541

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/test/CodeGen/Lanai/sub-cmp-peephole.ll
  llvm/test/CodeGen/RISCV/aext-to-sext.ll
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/varying-outer-2d-reduction.ll
  llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll
  llvm/test/CodeGen/X86/cmp-merge.ll
  llvm/test/CodeGen/X86/jump_sign.ll
  llvm/test/Transforms/InstCombine/abs-intrinsic.ll
  llvm/test/Transforms/InstCombine/icmp.ll
  llvm/test/Transforms/InstCombine/result-of-usub-is-non-zero-and-no-overflow.ll
  llvm/test/Transforms/InstCombine/strict-sub-underflow-check-to-comparison-of-sub-operands.ll
  llvm/test/Transforms/InstCombine/sub-ashr-or-to-icmp-select.ll
  llvm/test/Transforms/InstCombine/unsigned-sub-lack-of-overflow-check.ll
  llvm/test/Transforms/InstCombine/unsigned-sub-overflow-check.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152541.531667.patch
Type: text/x-patch
Size: 22523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/5c0d3cdc/attachment.bin>


More information about the llvm-commits mailing list