[Analysis][LoongArch] Add sign extension for i32 parameters and returns
authorzhanglimin <zhanglimin@loongson.cn>
Thu, 1 Jun 2023 03:13:47 +0000 (11:13 +0800)
committerWeining Lu <luweining@loongson.cn>
Thu, 1 Jun 2023 03:14:17 +0000 (11:14 +0800)
commitfe6716a49850be09291f0eded6fb8ffa9f5cc651
tree905278fc677e7f0d67946707fa476819d7b7f0d0
parent0ee4875ddff08ba1cdc96bc85a72a51727eb88f6
[Analysis][LoongArch] Add sign extension for i32 parameters and returns

In LoongArch ABI spec, we can see that in the LP64D ABI, unsigned 32-bit
types, such as unsigned int, are stored in general-purpose registers as
proper sign extensions of their 32-bit values.

Reference:
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_abi_lp64d

Reviewed By: SixWeining, xen0n

Differential Revision: https://reviews.llvm.org/D151794
llvm/include/llvm/Analysis/TargetLibraryInfo.h
llvm/test/Instrumentation/AddressSanitizer/experiment.ll
llvm/test/Instrumentation/AddressSanitizer/mem-intrinsics.ll
llvm/test/Instrumentation/ThreadSanitizer/atomic.ll