llvm-project/llvm/test/Transforms/InstCombine/X86
Craig Topper 374e0299cf [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
2019-12-31 15:06:47 -08:00
..
2009-03-23-i80-fp80.ll [X86][InstCombine] Move instcombine test from test/CodeGen/X86 to test/Transforms/InstCombine/ and replace grep with FileCheck 2019-12-01 10:31:04 -08:00
X86FsubCmpCombine.ll
addcarry.ll
blend_x86.ll
clmulqdq.ll
lit.local.cfg
pr2645-1.ll
shufflemask-undef.ll
x86-avx2.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-avx512.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-bmi-tbm.ll [X86][InstCombine] Add constant folding and simplification support for pdep and pext 2019-12-31 15:06:47 -08:00
x86-crc32-demanded.ll
x86-f16c.ll
x86-fma.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-insertps.ll
x86-masked-memops.ll
x86-movmsk.ll
x86-muldq.ll
x86-pack.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-pshufb.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-sse.ll
x86-sse2.ll
x86-sse4a.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-sse41.ll
x86-vec_demanded_elts.ll
x86-vector-shifts.ll
x86-vpermil.ll [InstCombine] remove identity shuffle simplification for mask with undefs 2019-11-24 10:06:26 -05:00
x86-xop.ll