diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-08-07 10:14:27 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-08-07 10:14:27 +0000 |
| commit | e206385e99c4ca9a70c8da297ff7643e2cfe06d2 (patch) | |
| tree | 62075db3260bc62b06cc790a13964411864f1c6f /llvm/lib | |
| parent | 3051f9761ef43877ec3017d955999e07cb0b09ac (diff) | |
| download | bcm5719-llvm-e206385e99c4ca9a70c8da297ff7643e2cfe06d2.tar.gz bcm5719-llvm-e206385e99c4ca9a70c8da297ff7643e2cfe06d2.zip | |
[x86] Fix another miscompile in the new vector shuffle lowering found
via the fuzz tester.
Here I missed an offset when round-tripping a value through a shuffle
mask. I got it right 2 lines below. See a problem? I do. ;] I'll
probably be adding a little "swap" algorithm which accepts a range and
two values and swaps those values where they occur in the range. Don't
really have a name for it, let me know if you do.
llvm-svn: 215094
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 2ef1a6925b6..d85ac5e55e4 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -7449,7 +7449,7 @@ static SDValue lowerV8I16SingleInputVectorShuffle( Input - SourceOffset; // We have to swap the uses in our half mask in one sweep. for (int &M : HalfMask) - if (M == SourceHalfMask[Input - SourceOffset]) + if (M == SourceHalfMask[Input - SourceOffset] + SourceOffset) M = Input; else if (M == Input) M = SourceHalfMask[Input - SourceOffset] + SourceOffset; |

