r209559 - Recommit r209532 with -ffreestanding.

Akira Hatanaka ahatanaka at apple.com
Fri May 23 15:12:03 PDT 2014


Author: ahatanak
Date: Fri May 23 17:12:01 2014
New Revision: 209559

URL: http://llvm.org/viewvc/llvm-project?rev=209559&view=rev
Log:
Recommit r209532 with -ffreestanding.

This is a test case for r209489.


Added:
    cfe/trunk/test/Headers/xmmintrin.c

Added: cfe/trunk/test/Headers/xmmintrin.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/xmmintrin.c?rev=209559&view=auto
==============================================================================
--- cfe/trunk/test/Headers/xmmintrin.c (added)
+++ cfe/trunk/test/Headers/xmmintrin.c Fri May 23 17:12:01 2014
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s
+
+#include <xmmintrin.h>
+
+// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by
+// checking that clang emits PACKSSDW instead of PACKSSWB.
+
+// CHECK: define i64 @test_mm_cvtps_pi16
+// CHECK: call x86_mmx @llvm.x86.mmx.packssdw
+
+__m64 test_mm_cvtps_pi16(__m128 a) {
+  return _mm_cvtps_pi16(a);
+}





More information about the cfe-commits mailing list