[PATCH] D59630: [InstCombine] Don't transform ((C1 OP zext(X)) & C2) -> zext((C1 OP X) & C2) if either zext or OP has another use.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 22:21:42 PDT 2019


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.

If they have other users we'll just end up increasing the instruction count.

We might be able to weaken this to only one of them having a single use if we can prove that the and will be removed.

Fixes PR41164.


https://reviews.llvm.org/D59630

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  test/Transforms/InstCombine/pr41164.ll
  test/Transforms/LoopVectorize/X86/small-size.ll
  test/Transforms/LoopVectorize/if-conversion-nest.ll
  test/Transforms/LoopVectorize/runtime-check.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59630.191632.patch
Type: text/x-patch
Size: 6159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190321/f93c6bab/attachment.bin>


More information about the llvm-commits mailing list