llvm-project/llvm/lib/Transforms/InstCombine
Nikita Popov 20853a7807 [InstCombine] Simplify cttz/ctlz + icmp eq/ne into mask check
Checking whether a number has a certain number of trailing / leading
zeros means checking whether it is of the form XXXX1000 / 0001XXXX,
which can be done with an and+icmp.

Related to https://bugs.llvm.org/show_bug.cgi?id=28668. As a next
step, this can be extended to non-equality predicates.

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

llvm-svn: 349530
2018-12-18 19:59:50 +00:00
..
CMakeLists.txt InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineAddSub.cpp [InstCombine] name change: foldShuffledBinop -> foldVectorBinop; NFC 2018-10-03 15:20:58 +00:00
InstCombineAndOrXor.cpp [CmpInstAnalysis] fix function signature for ICmp code to predicate; NFC 2018-12-04 18:53:27 +00:00
InstCombineCalls.cpp [InstCombine] try to convert x86 movmsk intrinsic to generic IR (PR39927) 2018-12-11 16:38:03 +00:00
InstCombineCasts.cpp [InstCombine] don't widen an arbitrary sequence of vector ops (PR40032) 2018-12-17 20:27:43 +00:00
InstCombineCompares.cpp [InstCombine] Simplify cttz/ctlz + icmp eq/ne into mask check 2018-12-18 19:59:50 +00:00
InstCombineInternal.h [InstCombine] add helper for icmp with dominator; NFC 2018-12-04 15:35:17 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Set debug loc on `mergeStoreIntoSuccessor` phi 2018-11-19 19:55:02 +00:00
InstCombineMulDivRem.cpp Add a emitUnaryFloatFnCall version that fetches the function name from TLI 2018-10-18 06:27:53 +00:00
InstCombinePHI.cpp Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC 2018-10-19 06:12:02 +00:00
InstCombineSelect.cpp [InstSimplify] fold select with implied condition 2018-11-29 18:44:39 +00:00
InstCombineShifts.cpp [InstCombine] Ensure nested shifts are in range (OSS-Fuzz #9880) 2018-11-06 11:28:22 +00:00
InstCombineSimplifyDemanded.cpp Revert r347871 "Fix: Add support for TFE/LWE in image intrinsic" 2018-11-29 20:14:17 +00:00
InstCombineTables.td InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineVectorOps.cpp [InstCombine] refactor isCheapToScalarize(); NFC 2018-12-18 19:07:38 +00:00
InstructionCombining.cpp [InstCombine] don't widen an arbitrary sequence of vector ops (PR40032) 2018-12-17 20:27:43 +00:00
LLVMBuild.txt