[PATCH] D84948: [InstCombine] Fold select/and/or with freeze(undef) that is used in the op only

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 07:17:07 PDT 2020


aqjune created this revision.
aqjune added reviewers: spatel, lebedev.ri, nikic.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aqjune requested review of this revision.

This is a simple patch that folds select/and/ors having freeze(undef) as an
operand. For select, the case when it is used at its condition is considered only.
It is fired only when freeze(undef) has only one use.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84948

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/and.ll
  llvm/test/Transforms/InstCombine/or.ll
  llvm/test/Transforms/InstCombine/select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84948.281923.patch
Type: text/x-patch
Size: 4511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200730/17e8d559/attachment.bin>


More information about the llvm-commits mailing list