llvm-project/llvm/lib/Transforms/InstCombine
Huihui Zhang 4626613ffe [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier.
Summary:
To generate simplified IR, make sure fold
  (X & ~C) ==/!= 0 --> X u</u>= C+1

is scheduled before fold
  ((X << Y) & C) == 0 -> (X & (C >> Y)) == 0.

https://rise4fun.com/Alive/7ZN

Reviewers: lebedev.ri, efriedma, spatel, craig.topper

Reviewed By: lebedev.ri

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63505

llvm-svn: 364255
2019-06-25 00:09:10 +00:00
..
CMakeLists.txt [InstCombine] Optimize `atomicrmw <op>, 0` into `load atomic` when possible 2019-02-07 21:27:23 +00:00
InstCombineAddSub.cpp [InstCombine] Handle -(X-Y) --> (Y-X) for unary fneg when NSZ 2019-06-11 16:21:21 +00:00
InstCombineAndOrXor.cpp [InstCombine] squash is-not-power-of-2 using ctpop 2019-06-24 22:35:26 +00:00
InstCombineAtomicRMW.cpp [InstCombine] Extend saturating idempotent atomicrmw transform to FP 2019-03-01 19:50:36 +00:00
InstCombineCalls.cpp [InstCombine] reduce funnel-shift i16 X, X, 8 to bswap X 2019-06-24 15:20:49 +00:00
InstCombineCasts.cpp [InstCombine] Update fptrunc (fneg x)) -> (fneg (fptrunc x) for unary FNeg 2019-06-11 15:45:41 +00:00
InstCombineCompares.cpp [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier. 2019-06-25 00:09:10 +00:00
InstCombineInternal.h [InstCombine] Refactor OptimizeOverflowCheck; NFCI 2019-05-26 11:43:37 +00:00
InstCombineLoadStoreAlloca.cpp Use the DataLayout::typeSizeEqualsStoreSize helper. NFC 2019-05-24 09:20:20 +00:00
InstCombineMulDivRem.cpp [InstCombine] canonicalize fdiv after fmul if reassociation is allowed 2019-04-15 13:23:38 +00:00
InstCombinePHI.cpp [InstCombine] SliceUpIllegalIntegerPHI - bail on out of range shifts 2019-06-24 13:13:36 +00:00
InstCombineSelect.cpp [InstCombine] allow unordered preds when canonicalizing to fabs() 2019-06-10 15:39:00 +00:00
InstCombineShifts.cpp [InstCombine] (1 << (C - x)) -> ((1 << C) >> x) if C is bitwidth - 1 2019-06-21 16:25:32 +00:00
InstCombineSimplifyDemanded.cpp [IntrinsicEmitter] Extend argument overloading with forward references. 2019-06-13 08:19:33 +00:00
InstCombineTables.td InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineVectorOps.cpp [InstCombine] prevent crashing with invalid extractelement index 2019-05-26 14:03:50 +00:00
InstructionCombining.cpp InstCombine: Preserve nuw when reassociating nuw ops [3/3] 2019-06-24 21:37:03 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00