[x86] Rewrite a core part of the new vector shuffle lowering to handle
authorChandler Carruth <chandlerc@gmail.com>
Wed, 13 Aug 2014 01:25:45 +0000 (01:25 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 13 Aug 2014 01:25:45 +0000 (01:25 +0000)
commit6bb093bbe75f626aeb31611334838c518f32ec9c
treed8412b79c882a0615f3fa3323d99269905771659
parente693d3c55804812afbcca2268465d9a3fdd56b6f
[x86] Rewrite a core part of the new vector shuffle lowering to handle
one pesky test case correctly.

This test case caused the old code to infloop occilating between solving
the low-half and the high-half. The 'side balancing' part of
single-input v8 shuffle lowering didn't handle the one pattern which can
cause it to occilate. Fortunately the fuzz testing found this case.
Unfortuately it was *terrible* to handle. I'm really sorry for the
amount and density of the code here, I'd love suggestions on how to
simplify it. I feel like there *must* be a simpler form here, but after
a lot of days I've not found it. This is the only one I've found that
even works. I've added the one pesky test case along with some nice
comments explaining the core problem that we have to solve here.

So far this has survived approximately 32k test cases. More strenuous
fuzzing commencing.

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