[PATCH] D117110: [InstCombine] try to fold binop with phi operands

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 09:00:52 PST 2022


spatel updated this revision to Diff 399348.
spatel edited the summary of this revision.
spatel added a comment.

Patch updated:

1. Added the necessary clause that prevents hoisting into a conditional predecessor (and more tests).
2. Added a TODO for handling phi with 2 constant incoming values (not sure yet if that's reliably handled by simplifycfg and/or other instcombines).


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

https://reviews.llvm.org/D117110

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/binop-phi-operands.ll
  llvm/test/Transforms/InstCombine/zext-or-icmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117110.399348.patch
Type: text/x-patch
Size: 23929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/2b8d2f8f/attachment.bin>


More information about the llvm-commits mailing list