[PATCH] D102279: [InstCombine] Support one-hot merge for logical and/or

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 14:31:54 PDT 2021


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

If a logical and/or is used, we need to be careful not to propagate a potential poison value from the RHS by inserting a freeze instruction. Otherwise it works the same way as bitwise and/or.

This is intended to address the regression reported at https://reviews.llvm.org/D101191#2751002.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102279

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/onehot_merge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102279.344563.patch
Type: text/x-patch
Size: 13092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/d336f889/attachment.bin>


More information about the llvm-commits mailing list