From 752f03f59ce8911bf0dcd01349f5b7ff7ab88d17 Mon Sep 17 00:00:00 2001 From: "Ivan A. Kosarev" Date: Tue, 17 Apr 2018 16:43:07 +0000 Subject: [PATCH] [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only Differential Revision: https://reviews.llvm.org/D45668 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330195 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/arm_neon.td | 10 ++++++++-- test/CodeGen/arm_neon_intrinsics.c | 14 -------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/include/clang/Basic/arm_neon.td b/include/clang/Basic/arm_neon.td index 0e3be38586..4c8809a591 100644 --- a/include/clang/Basic/arm_neon.td +++ b/include/clang/Basic/arm_neon.td @@ -398,8 +398,14 @@ def VCOMBINE : NoTestOpInst<"vcombine", "kdd", "csilhfUcUsUiUlPcPs", OP_CONC>; //////////////////////////////////////////////////////////////////////////////// // E.3.21 Splitting vectors let InstName = "vmov" in { -def VGET_HIGH : NoTestOpInst<"vget_high", "dk", "csilhfUcUsUiUlPcPs", OP_HI>; -def VGET_LOW : NoTestOpInst<"vget_low", "dk", "csilhfUcUsUiUlPcPs", OP_LO>; +def VGET_HIGH : NoTestOpInst<"vget_high", "dk", "csilfUcUsUiUlPcPs", OP_HI>; +def VGET_LOW : NoTestOpInst<"vget_low", "dk", "csilfUcUsUiUlPcPs", OP_LO>; +} +let ArchGuard = "__ARM_ARCH >= 8 && defined(__aarch64__)" in { + let InstName = "vmov" in { + def VGET_HIGH_F16 : NoTestOpInst<"vget_high", "dk", "h", OP_HI>; + def VGET_LOW_F16 : NoTestOpInst<"vget_low", "dk", "h", OP_LO>; + } } //////////////////////////////////////////////////////////////////////////////// diff --git a/test/CodeGen/arm_neon_intrinsics.c b/test/CodeGen/arm_neon_intrinsics.c index 95ac3dca7a..1247ce2884 100644 --- a/test/CodeGen/arm_neon_intrinsics.c +++ b/test/CodeGen/arm_neon_intrinsics.c @@ -3254,13 +3254,6 @@ int64x1_t test_vget_high_s64(int64x2_t a) { return vget_high_s64(a); } -// CHECK-LABEL: @test_vget_high_f16( -// CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x half> %a, <8 x half> %a, <4 x i32> -// CHECK: ret <4 x half> [[SHUFFLE_I]] -float16x4_t test_vget_high_f16(float16x8_t a) { - return vget_high_f16(a); -} - // CHECK-LABEL: @test_vget_high_f32( // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> // CHECK: ret <2 x float> [[SHUFFLE_I]] @@ -3560,13 +3553,6 @@ int64x1_t test_vget_low_s64(int64x2_t a) { return vget_low_s64(a); } -// CHECK-LABEL: @test_vget_low_f16( -// CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x half> %a, <8 x half> %a, <4 x i32> -// CHECK: ret <4 x half> [[SHUFFLE_I]] -float16x4_t test_vget_low_f16(float16x8_t a) { - return vget_low_f16(a); -} - // CHECK-LABEL: @test_vget_low_f32( // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> // CHECK: ret <2 x float> [[SHUFFLE_I]] -- 2.40.0