diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-08-15 03:54:49 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-08-15 03:54:49 +0000 |
| commit | 17fd848bfafd5ee4dd36887d9c3c8556d0f013fe (patch) | |
| tree | bbed3f938517be41c7be559686e1a083db6914cb /llvm/lib/Target/X86 | |
| parent | fe963b17644c8b02784cb1863155ad236d6f96af (diff) | |
| download | bcm5719-llvm-17fd848bfafd5ee4dd36887d9c3c8556d0f013fe.tar.gz bcm5719-llvm-17fd848bfafd5ee4dd36887d9c3c8556d0f013fe.zip | |
[x86] Fix the very broken formation of vpunpck instructions in the
target-specific shuffl DAG combines.
We were recognizing the paired shuffles backwards. This code needs to be
replaced anyways as we have the same functionality elsewhere, but I'll
do the refactoring in a follow-up, this is the minimal fix to the
behavior.
In addition to fixing miscompiles with the new vector shuffle lowering,
it also causes the canonicalization to kick in much better, selecting
the smaller encoding variants in lots of places in the new AVX path.
This still isn't quite ideal as we don't need both the shufpd and the
punpck instructions, but that'll get fixed in a follow-up patch.
llvm-svn: 215690
Diffstat (limited to 'llvm/lib/Target/X86')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index c2f284496d5..5143f19c763 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -19496,7 +19496,7 @@ static bool combineX86ShufflesRecursively(SDValue Op, SDValue Root, while (Mask.size() > 1) { SmallVector<int, 16> NewMask; for (int i = 0, e = Mask.size()/2; i < e; ++i) { - if (Mask[2*i] % 2 != 0 || Mask[2*i] != Mask[2*i + 1] + 1) { + if (Mask[2*i] % 2 != 0 || Mask[2*i] + 1 != Mask[2*i + 1]) { NewMask.clear(); break; } |

