[all-commits] [llvm/llvm-project] d608fe: [ARM, MVE] Fix user-namespace violation in arm_mve.h.
Simon Tatham via All-commits
all-commits at lists.llvm.org
Thu Mar 12 04:14:22 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d608fee8399a9fa6f2819076131c6ac30cc16eef
https://github.com/llvm/llvm-project/commit/d608fee8399a9fa6f2819076131c6ac30cc16eef
Author: Simon Tatham <simon.tatham at arm.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M clang/utils/TableGen/MveEmitter.cpp
Log Message:
-----------
[ARM,MVE] Fix user-namespace violation in arm_mve.h.
Summary:
We were generating the declarations of polymorphic intrinsics using
`__attribute__((overloadable))`. But `overloadable` is a valid
identifier for an end user to define as a macro in a C program, and if
they do that before including `<arm_mve.h>`, then we shouldn't cause a
compile error.
Fixed to spell the attribute name `__overloadable__` instead.
Reviewers: miyuki, MarkMurrayARM, ostannard
Reviewed By: miyuki
Subscribers: kristof.beyls, dmgreen, danielkiss, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75997
Commit: 3f8e714e2f9f2dc3367d2f3fc569abfaf28f314c
https://github.com/llvm/llvm-project/commit/3f8e714e2f9f2dc3367d2f3fc569abfaf28f314c
Author: Simon Tatham <simon.tatham at arm.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M clang/include/clang/Basic/arm_mve.td
M clang/include/clang/Basic/arm_mve_defs.td
A clang/test/CodeGen/arm-mve-intrinsics/ternary.c
M llvm/include/llvm/IR/IntrinsicsARM.td
M llvm/lib/Target/ARM/ARMInstrMVE.td
M llvm/test/CodeGen/Thumb2/mve-fmas.ll
A llvm/test/CodeGen/Thumb2/mve-intrinsics/ternary.ll
Log Message:
-----------
[ARM,MVE] Add intrinsics and isel for MVE fused multiply-add.
Summary:
This adds the ACLE intrinsic family for the VFMA and VFMS
instructions, which perform fused multiply-add on vectors of floats.
I've represented the unpredicated versions in IR using the cross-
platform `@llvm.fma` IR intrinsic. We already had isel rules to
convert one of those into a vector VFMA in the simplest possible way;
but we didn't have rules to detect a negated argument and turn it into
VFMS, or rules to detect a splat argument and turn it into one of the
two vector/scalar forms of the instruction. Now we have all of those.
The predicated form uses a target-specific intrinsic as usual, but
I've stuck to just one, for a predicated FMA. The subtraction and
splat versions are code-generated by passing an fneg or a splat as one
of its operands, the same way as the unpredicated version.
In arm_mve_defs.h, I've had to introduce a tiny extra piece of
infrastructure: a record `id` for use in codegen dags which implements
the identity function. (Just because you can't declare a Tablegen
value of type dag which is //only// a `$varname`: you have to wrap it
in something. Now I can write `(id $varname)` to get the same effect.)
Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D75998
Compare: https://github.com/llvm/llvm-project/compare/13be27482e53...3f8e714e2f9f
More information about the All-commits
mailing list