Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler-rt: prevent llvm making memcpy recursive
before this commit, when compiling for target riscv64-linux-none and with `-mcpu basline`, recursive jalr instructions were generated that caused infinite looping and a stack overflow for copy lengths between 16 and 31 (inclusive). This was caused by LLVM optimisations - in particular LLVM has an optimisation that can turn copies of a sufficient length into a call to memcpy. This change breaks up some copies in order to try and prevent this optimisation from occuring.
- Loading branch information