mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
When using vec_load/store_len_r with an immediate length operand of 16 or larger, LLVM will currently emit an VLRL/VSTRL instruction with that immediate. This creates a valid encoding (which should be supported by the assembler), but always traps at runtime. This patch fixes this by not creating VLRL/VSTRL in those cases. This would result in loading the length into a register and calling VLRLR/VSTRLR instead. However, these operations with a length of 15 or larger are in fact simply equivalent to a full vector load or store. And in fact the same holds true for vec_load/store_len as well. Therefore, add a DAGCombine rule to replace those operations with plain vector loads or stores if the length is known at compile time and equal or larger to 15.
The LLVM Compiler Infrastructure ================================ This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the documentation provided in docs/ for further assistance with LLVM, and in particular docs/GettingStarted.rst for getting started with LLVM and docs/README.txt for an overview of LLVM's documentation setup. If you are writing a package for LLVM, see docs/Packaging.rst for our suggestions.