[PATCH] D134348: [InstSimplify] Support vectors in simplifyWithOpReplaced()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 03:33:13 PDT 2022


nikic created this revision.
nikic added a reviewer: spatel.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We can handle vectors inside simplifyWithOpReplaced(), as long as cross-lane operations are excluded. The equality can hold (or not hold) for each vector lane independently, so we shouldn't use the replacement value from other lanes.

I believe the only operations relevant here are shufflevector (where all previous bugs were seen) and calls (which might use shuffle-like intrinsics and would require more careful classification).


https://reviews.llvm.org/D134348

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/select-safe-bool-transforms.ll
  llvm/test/Transforms/InstCombine/select.ll
  llvm/test/Transforms/InstSimplify/select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134348.461842.patch
Type: text/x-patch
Size: 8535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220921/26f64a52/attachment.bin>


More information about the llvm-commits mailing list