From 7de2980d9db755517d2f28f19f0f2c623b147e9a Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Sat, 16 May 2015 22:06:40 +0000
Subject: Bring the contrib/llvm/patches directory up-to-date.

MFC r263892:
Add the llvm/clang patch for r263891.

MFC r264350:
Update the llvm/clang patch for r264345.

MFC r266675:
Add the clang patch for r266674.

MFC r275651:
Add llvm patch corresponding to r275633.

MFC r275747:
Update llvm patches for r274286 and r275633 so all the tests will pass.

MFC r275760:
Add clang patch corresponding to r275759.

MFC r275772:
Update clang patch for r275759 to use correct test cases.

Additionally:
* Remove the clang patch corresponding to r263619, as ARM EABI
  hard-float support was never MFC'd.
* Add clang patch corresponding to r279302.
---
 .../patch-r266674-clang-r209489-fix-xmmintrin.diff | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff

(limited to 'contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff')

diff --git a/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff b/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff
new file mode 100644
index 0000000..78473aa
--- /dev/null
+++ b/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff
@@ -0,0 +1,49 @@
+Pull in r209489 from upstream clang trunk (by Akira Hatanaka):
+
+  Fix a bug in xmmintrin.h.
+
+  The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
+  that reads two __m64 values and packs four 32-bit values into four 16-bit
+  values.  
+
+  <rdar://problem/16873717>
+
+Pull in r209559 from upstream clang trunk (by Akira Hatanaka):
+
+  Recommit r209532 with -ffreestanding.
+
+  This is a test case for r209489.
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/266674
+
+Index: tools/clang/lib/Headers/xmmintrin.h
+===================================================================
+--- tools/clang/lib/Headers/xmmintrin.h
++++ tools/clang/lib/Headers/xmmintrin.h
+@@ -903,7 +903,7 @@ _mm_cvtps_pi16(__m128 __a)
+   __a = _mm_movehl_ps(__a, __a);
+   __c = _mm_cvtps_pi32(__a);
+   
+-  return _mm_packs_pi16(__b, __c);
++  return _mm_packs_pi32(__b, __c);
+ }
+ 
+ static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
+Index: tools/clang/test/Headers/xmmintrin.c
+===================================================================
+--- tools/clang/test/Headers/xmmintrin.c
++++ tools/clang/test/Headers/xmmintrin.c
+@@ -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);
++}
-- 
cgit v1.1