[PATCH] D68838: [ARM] Fix arm_neon.h with -flax-vector-conversions=none, part 3

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 14:57:35 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5b0e039a7a7d: [ARM] Fix arm_neon.h with -flax-vector-conversions=none, part 3 (authored by efriedma).

Changed prior to commit:
  https://reviews.llvm.org/D68838?vs=224496&id=225534#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68838/new/

https://reviews.llvm.org/D68838

Files:
  clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
  clang/utils/TableGen/NeonEmitter.cpp


Index: clang/utils/TableGen/NeonEmitter.cpp
===================================================================
--- clang/utils/TableGen/NeonEmitter.cpp
+++ clang/utils/TableGen/NeonEmitter.cpp
@@ -1442,7 +1442,8 @@
     }
 
     // Check if an explicit cast is needed.
-    if (CastToType.isVector() && LocalCK == ClassB) {
+    if (CastToType.isVector() &&
+        (LocalCK == ClassB || (T.isHalf() && !T.isScalarForMangling()))) {
       CastToType.makeInteger(8, true);
       Arg = "(" + CastToType.str() + ")" + Arg;
     } else if (CastToType.isVector() && LocalCK == ClassI) {
Index: clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
===================================================================
--- clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
+++ clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-feature +fullfp16 -target-feature +v8.2a\
-// RUN: -fallow-half-arguments-and-returns -S -disable-O0-optnone -emit-llvm -o - %s \
+// RUN: -fallow-half-arguments-and-returns -flax-vector-conversions=none -S -disable-O0-optnone -emit-llvm -o - %s \
 // RUN: | opt -S -mem2reg \
 // RUN: | FileCheck %s
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68838.225534.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191017/843f0c64/attachment-0001.bin>


More information about the cfe-commits mailing list