r275195 - AArch64: fix return type of vqmovun_high_*.

Tim Northover via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 10:38:50 PDT 2016


Author: tnorthover
Date: Tue Jul 12 12:38:50 2016
New Revision: 275195

URL: http://llvm.org/viewvc/llvm-project?rev=275195&view=rev
Log:
AArch64: fix return type of vqmovun_high_*.

These should be returning an unsigned quantity.

Added:
    cfe/trunk/test/Sema/arm64-neon-header.c
Modified:
    cfe/trunk/include/clang/Basic/arm_neon.td

Modified: cfe/trunk/include/clang/Basic/arm_neon.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/arm_neon.td?rev=275195&r1=275194&r2=275195&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/arm_neon.td (original)
+++ cfe/trunk/include/clang/Basic/arm_neon.td Tue Jul 12 12:38:50 2016
@@ -967,7 +967,7 @@ def XTN2 : SOpInst<"vmovn_high", "qhk",
 
 ////////////////////////////////////////////////////////////////////////////////
 // Signed integer saturating extract and unsigned narrow to high
-def SQXTUN2 : SOpInst<"vqmovun_high", "qhk", "sil", OP_SQXTUN>;
+def SQXTUN2 : SOpInst<"vqmovun_high", "emd", "HsHiHl", OP_SQXTUN>;
 
 ////////////////////////////////////////////////////////////////////////////////
 // Integer saturating extract and narrow to high

Added: cfe/trunk/test/Sema/arm64-neon-header.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/arm64-neon-header.c?rev=275195&view=auto
==============================================================================
--- cfe/trunk/test/Sema/arm64-neon-header.c (added)
+++ cfe/trunk/test/Sema/arm64-neon-header.c Tue Jul 12 12:38:50 2016
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -Wvector-conversion -fsyntax-only -ffreestanding -verify %s
+
+#include <arm_neon.h>
+
+int16x8_t foo(int8x8_t p0, int16x8_t p1) {
+  return vqmovun_high_s16(p0, p1); // expected-warning {{incompatible vector types returning 'uint8x16_t'}}
+}




More information about the cfe-commits mailing list