]> granicus.if.org Git - clang/commitdiff
AArch64: fix return type of vqmovun_high_*.
authorTim Northover <tnorthover@apple.com>
Tue, 12 Jul 2016 17:38:50 +0000 (17:38 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 12 Jul 2016 17:38:50 +0000 (17:38 +0000)
These should be returning an unsigned quantity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275195 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/arm_neon.td
test/Sema/arm64-neon-header.c [new file with mode: 0644]

index 44325fde9f51301e49ee7f1c1f29f7cd2917acbb..5605fc6de2b62fb9ffbbcff5d4194ea93af81af0 100644 (file)
@@ -967,7 +967,7 @@ def XTN2 : SOpInst<"vmovn_high", "qhk", "silUsUiUl", OP_XTN>;
 
 ////////////////////////////////////////////////////////////////////////////////
 // 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
diff --git a/test/Sema/arm64-neon-header.c b/test/Sema/arm64-neon-header.c
new file mode 100644 (file)
index 0000000..0ae0821
--- /dev/null
@@ -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'}}
+}