[PATCH] D123962: [InstCombine] fold freeze of partial undef/poison vector constants

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 14:45:08 PDT 2022


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

We can always replace the undef elements in a vector constant with regular constants to get rid of the freeze:
https://alive2.llvm.org/ce/z/nfRb4F

The select diffs show that we might do better by adjusting the logic for a frozen select condition, but I think those are still improvements.


https://reviews.llvm.org/D123962

Files:
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/freeze-phi.ll
  llvm/test/Transforms/InstCombine/freeze.ll
  llvm/test/Transforms/InstCombine/select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123962.423473.patch
Type: text/x-patch
Size: 5268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220418/f20db3da/attachment.bin>


More information about the llvm-commits mailing list