llvm-project/llvm/lib/Transforms/InstCombine
Simon Pilgrim 72d1419bfb [InstCombine] Add CTPOP -> CTTZ simplifications (PR43513)
As detailed on PR43513, we can simplify:

ctpop(x | -x) -> bitwidth - cttz(x, false)
Alive2: http://volta.cs.utah.edu:8080/z/caw49X

ctpop(~x & (x - 1)) -> cttz(x, false)
Alive2: http://volta.cs.utah.edu:8080/z/5zfVrx

I've tweaked the initial test cases I added at rG2d712fb75584 to increase commutativity testing.

Differential Revision: https://reviews.llvm.org/D76568
2020-03-23 11:04:33 +00:00
..
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
InstCombineAddSub.cpp [instcombine] remove fsub to fneg hacks; only emit fneg 2020-03-10 16:57:02 +01:00
InstCombineAndOrXor.cpp [InstCombin] Avoid nested Create calls, to guarantee order. 2020-02-18 09:44:11 +01:00
InstCombineAtomicRMW.cpp [InstCombine] Use replaceOperand() in more places 2020-02-11 17:38:23 +01:00
InstCombineCalls.cpp [InstCombine] Add CTPOP -> CTTZ simplifications (PR43513) 2020-03-23 11:04:33 +00:00
InstCombineCasts.cpp Remove CompositeType class. 2020-03-18 13:53:17 -07:00
InstCombineCompares.cpp [SVE] Update API ConstantVector::getSplat() to use ElementCount. 2020-03-12 13:22:41 -07:00
InstCombineInternal.h [InstCombine] Remove ExpensiveCombines option 2020-03-22 16:56:28 +01:00
InstCombineLoadStoreAlloca.cpp [InstCombine][SVE] Fix InstCombiner::visitAllocaInst for scalable vector. 2020-03-18 20:57:14 -07:00
InstCombineMulDivRem.cpp Remove BinaryOperator::CreateFNeg 2020-02-27 09:06:03 -08:00
InstCombinePHI.cpp [WinEH] Fix inttoptr+phi optimization in presence of catchswitch 2020-03-01 07:49:28 -08:00
InstCombineSelect.cpp [instcombine] remove fsub to fneg hacks; only emit fneg 2020-03-10 16:57:02 +01:00
InstCombineShifts.cpp [SVE] Update API ConstantVector::getSplat() to use ElementCount. 2020-03-12 13:22:41 -07:00
InstCombineSimplifyDemanded.cpp [InstCombine] Handle known shl nsw sign bit in SimplifyDemanded 2020-03-20 18:16:05 +01:00
InstCombineTables.td InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineVectorOps.cpp [instcombine] remove fsub to fneg hacks; only emit fneg 2020-03-10 16:57:02 +01:00
InstructionCombining.cpp [InstCombine] Remove ExpensiveCombines option 2020-03-22 16:56:28 +01:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00