llvm-project
llvm-project copied to clipboard
clang palignr codegen bug
| Bugzilla Link | 5743 |
| Resolution | FIXED |
| Resolved on | Dec 09, 2009 19:38 |
| Version | trunk |
| OS | All |
| CC | @echristo |
Extended Description
Looks like clang has incorrect codegen for the following test:
#include <tmmintrin.h>
int main(int argc, char **argv) { __m128i x = _mm_setzero_si128(), y = _mm_alignr_epi8(x, x, 1);
return 0; }
Where it's generating:
palignr $0, %xmm1, %xmm1
The constant should be $1. I'm guessing somewhere we've got an extra divide by 8.
I checked in a minimal fix here: r91032
Yup. I'll take this :)
clang is generating this: call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %tmp2, <2 x i64> %tmp3, i8 1)
instead of ... 8)
Are you still planning to delete these terrible intrinsics?