aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-12-31 15:06:47 -0800
committerCraig Topper <craig.topper@intel.com>2019-12-31 15:06:47 -0800
commit374e0299cf08dc1ff2c68e7f6c159b98ab55dfb8 (patch)
tree09a3f096082cee0c493c77478a7318a1a014f619 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent1cc8a74de345b66fd340ddc71580ad412e8e2abf (diff)
downloadllvm-374e0299cf08dc1ff2c68e7f6c159b98ab55dfb8.zip
llvm-374e0299cf08dc1ff2c68e7f6c159b98ab55dfb8.tar.gz
llvm-374e0299cf08dc1ff2c68e7f6c159b98ab55dfb8.tar.bz2
[X86][InstCombine] Add constant folding and simplification support for pdep and pext
The instructions use a mask to either pack disjoint bits together(pext) or spread bits to disjoint locations(pdep). If the mask is all 0s then no bits are extracted or deposited. If the mask is all ones, then the source value is written to the result since no compression or expansion happens. Otherwise if both the source and mask are constant we can walk the bits in the source/mask and calculate the result. There other crazier things we could do like computeKnownBits or turning pext into shift/and if only a single contiguous range of bits is extracted. Fixes PR44389 Differential Revision: https://reviews.llvm.org/D71952
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions