diff options
| author | Nadav Rotem <nadav.rotem@intel.com> | 2012-01-12 15:31:55 +0000 |
|---|---|---|
| committer | Nadav Rotem <nadav.rotem@intel.com> | 2012-01-12 15:31:55 +0000 |
| commit | 0a0a829beaf5d1030f56bd3290df593a9f6f4a76 (patch) | |
| tree | 6c0f69e209f520c9d9e7212b33fd61dab56e8072 /llvm/lib | |
| parent | fd950878fa902a9d5ec6f3accd96bad12ca8979f (diff) | |
| download | bcm5719-llvm-0a0a829beaf5d1030f56bd3290df593a9f6f4a76.tar.gz bcm5719-llvm-0a0a829beaf5d1030f56bd3290df593a9f6f4a76.zip | |
Fix a bug in the AVX 256-bit shuffle code in cases where the splat element is on the boundary of two 128-bit vectors.
The attached testcase was stuck in an endless loop.
llvm-svn: 148027
Diffstat (limited to 'llvm/lib')
| -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 771ca082506..c643cefb6c0 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -4413,7 +4413,7 @@ static SDValue PromoteSplat(ShuffleVectorSDNode *SV, SelectionDAG &DAG) { // Extract the 128-bit part containing the splat element and update // the splat element index when it refers to the higher register. if (Size == 256) { - unsigned Idx = (EltNo > NumElems/2) ? NumElems/2 : 0; + unsigned Idx = (EltNo >= NumElems/2) ? NumElems/2 : 0; V1 = Extract128BitVector(V1, DAG.getConstant(Idx, MVT::i32), DAG, dl); if (Idx > 0) EltNo -= NumElems/2; |

