llvm-project/llvm/test/Transforms/InstCombine/X86
Sanjay Patel 30be665e82 [PatternMatch] allow undef elements when matching a vector zero
This is the last step in getting constant pattern matchers to allow
undef elements in constant vectors.

I'm adding a dedicated m_ZeroInt() function and building m_Zero() from
that. In most cases, calling code can be updated to use m_ZeroInt()
directly when there's no need to match pointers, but I'm leaving that
efficiency optimization as a follow-up step because it's not always
clear when that's ok.

There are just enough icmp folds in InstSimplify that can be used for 
integer or pointer types, that we probably still want a generic m_Zero()
for those cases. Otherwise, we could eliminate it (and possibly add a
m_NullPtr() as an alias for isa<ConstantPointerNull>()).

We're conservatively returning a full zero vector (zeroinitializer) in
InstSimplify/InstCombine on some of these folds (see diffs in InstSimplify),
but I'm not sure if that's actually necessary in all cases. We may be 
able to propagate an undef lane instead. One test where this happens is 
marked with 'TODO'.
 

llvm-svn: 330550
2018-04-22 17:07:44 +00:00
..
X86FsubCmpCombine.ll [PatternMatch] allow undef elements when matching vector FP +0.0 2018-03-25 21:16:33 +00:00
blend_x86.ll
lit.local.cfg
pr2645-1.ll
shufflemask-undef.ll
x86-avx2.ll
x86-avx512.ll
x86-bmi-tbm.ll [X86][InstCombine] Add some simplifications for BZHI intrinsics 2017-07-31 18:52:15 +00:00
x86-crc32-demanded.ll
x86-f16c.ll
x86-fma.ll
x86-insertps.ll
x86-masked-memops.ll
x86-movmsk.ll
x86-muldq.ll [X86] Remove the pmuldq/pmuldq intrinsics and replace with native IR. 2018-04-13 06:07:18 +00:00
x86-pack.ll
x86-pshufb.ll [InstCombine] improve demanded vector elements analysis of insertelement 2017-08-31 15:57:17 +00:00
x86-sse.ll
x86-sse2.ll
x86-sse4a.ll
x86-sse41.ll
x86-vec_demanded_elts.ll
x86-vector-shifts.ll [PatternMatch] allow undef elements when matching a vector zero 2018-04-22 17:07:44 +00:00
x86-vpermil.ll
x86-xop.ll