mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
308e2db83d
Summary: This patch makes sure that the field VFShape.VF is greater than zero when demangling the vector function name of scalable vector functions encoded in the "vector-function-abi-variant" attribute. This change is required to be able to provide instances of VFShape that can be used to query the VFDatabase for the vectorization passes, as such passes always require a positive value for the Vectorization Factor (VF) needed by the vectorization process. It is not possible to extract the value of VFShape.VF from the mangled name of scalable vector functions, because it is encoded as `x`. Therefore, the VFABI demangling function has been modified to extract such information from the IR declaration of the vector function, under the assumption that _all_ vectors in the signature of the vector function have the same number of lanes. Such assumption is valid because it is also assumed by the Vector Function ABI specifications supported by the demangling function (x86, AArch64, and LLVM internal one). The unit tests that demangle scalable names have been modified by adding the IR module that carries the declaration of the vector function name being demangled. In particular, the demangling function fails in the following cases: 1. When the declaration of the scalable vector function is not present in the module. 2. When the value of VFSHape.VF is not greater than 0. Reviewers: jdoerfert, sdesmalen, andwar Reviewed By: jdoerfert Subscribers: mgorny, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73286 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
vfabi-demangler-fuzzer.cpp |