[PATCH] D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 23:00:29 PDT 2018


mkazantsev created this revision.
mkazantsev added reviewers: spatel, lebedev.ri, DaniilSuchkov, reames.

This patch changes order of transform in InstCombineCompares to avoid
performing transforms based on ranges which produce complex bit arithmetics
before more simple things (like folding with constants) are done. See PR37636
for the motivating example.


https://reviews.llvm.org/D48584

Files:
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Analysis/ValueTracking/non-negative-phi-bits.ll
  test/Transforms/InstCombine/icmp-shl-nsw.ll
  test/Transforms/InstCombine/icmp-shr-lt-gt.ll
  test/Transforms/InstCombine/icmp_sdiv_with_and_without_range.ll
  test/Transforms/LoopVectorize/X86/masked_load_store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48584.152835.patch
Type: text/x-patch
Size: 8628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180626/6540e018/attachment.bin>


More information about the llvm-commits mailing list