]> granicus.if.org Git - llvm/commit
[x86] Fix yet another bug in the new vector shuffle lowering's handling
authorChandler Carruth <chandlerc@gmail.com>
Sun, 28 Sep 2014 03:30:25 +0000 (03:30 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 28 Sep 2014 03:30:25 +0000 (03:30 +0000)
commit21b69296fbfccc5a24c21dccaf106c40ba1beeab
tree0f87503d052c706ee76e3707dababef8ddb1136a
parente05d3b921f17e393b76bcc5e6a9d03fbebeda410
[x86] Fix yet another bug in the new vector shuffle lowering's handling
of widening masks.

We can't widen a zeroing mask unless both elements that would be merged
are either zeroed or undef. This is the only way to widen a mask if it
has a zeroed element.

Also clean up the code here by ordering the checks in a more logical way
and by using the symoblic values for undef and zero. I'm actually torn
on using the symbolic values because the existing code is littered with
the assumption that -1 is undef, and moreover that entries '< 0' are the
special entries. While that works with the values given to these
constants, using the symbolic constants actually makes it a bit more
opaque why this is the case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218575 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-128-v16.ll