[llvm-commits] [llvm] r104090 - /llvm/trunk/test/FrontendC/2010-05-18-palignr.c
Eric Christopher
echristo at apple.com
Tue May 18 17:22:04 PDT 2010
Author: echristo
Date: Tue May 18 19:22:04 2010
New Revision: 104090
URL: http://llvm.org/viewvc/llvm-project?rev=104090&view=rev
Log:
Add a test to make sure that we're lowering the shift amount correctly.
Added:
llvm/trunk/test/FrontendC/2010-05-18-palignr.c
Added: llvm/trunk/test/FrontendC/2010-05-18-palignr.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2010-05-18-palignr.c?rev=104090&view=auto
==============================================================================
--- llvm/trunk/test/FrontendC/2010-05-18-palignr.c (added)
+++ llvm/trunk/test/FrontendC/2010-05-18-palignr.c Tue May 18 19:22:04 2010
@@ -0,0 +1,22 @@
+// RUN: %llvmgcc -mssse3 -S -o - %s | llc -mtriple=x86_64-apple-darwin | FileCheck %s
+
+#include <tmmintrin.h>
+
+int main ()
+{
+#if defined( __SSSE3__ )
+
+#define vec_rld_epi16( _a, _i ) ({ vSInt16 _t = _a; _t = _mm_alignr_epi8( _t, _t, _i ); /*return*/ _t; })
+ typedef int16_t vSInt16 __attribute__ ((__vector_size__ (16)));
+
+ short dtbl[] = {1,2,3,4,5,6,7,8};
+ vSInt16 *vdtbl = (vSInt16*) dtbl;
+
+ vSInt16 v0;
+ v0 = *vdtbl;
+ // CHECK: pshufd $57
+ v0 = vec_rld_epi16( v0, 4 );
+
+ return 0;
+#endif
+}
More information about the llvm-commits
mailing list