llvm-project/llvm/lib/Transforms/InstCombine
Roman Lebedev 0bde7c6527 [InstCombine] Shift amount reassociation: fixup constantexpr handling (PR42484)
I was actually wondering if there was some nicer way than m_Value()+cast,
but apparently what i was really "subconsciously" thinking about
was correctness issue.

hasNoUnsignedWrap()/hasNoUnsignedWrap() exist for Instruction,
not for BinaryOperator, so let's just use m_Instruction(),
thus both avoiding a cast, and a crash.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42484,
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15587

llvm-svn: 364915
2019-07-02 12:54:48 +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] (Y + ~X) + 1 --> Y - X fold (PR42459) 2019-07-01 15:55:24 +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] reduce more checks for power-of-2-or-zero using ctpop 2019-07-01 22:00:00 +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] canonicalize fcmp+select to minnum/maxnum intrinsics 2019-06-30 13:40:31 +00:00
InstCombineShifts.cpp [InstCombine] Shift amount reassociation: fixup constantexpr handling (PR42484) 2019-07-02 12:54:48 +00:00
InstCombineSimplifyDemanded.cpp [IntrinsicEmitter] Extend argument overloading with forward references. 2019-06-13 08:19:33 +00:00
InstCombineTables.td
InstCombineVectorOps.cpp [InstCombine] simplify code for inserts -> splat; NFC 2019-06-26 15:52:59 +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