[LoongArch] Implement TargetLowering::isLegalAddressingMode() hook
authorgonglingqin <gonglingqin@loongson.cn>
Thu, 2 Feb 2023 06:00:04 +0000 (14:00 +0800)
committergonglingqin <gonglingqin@loongson.cn>
Thu, 2 Feb 2023 06:01:44 +0000 (14:01 +0800)
commitd6f1c85edb36e789307ceebcba6e096bd7f958a7
tree1a7fda85801a80541eb7e9487255ad0d25ed0bca
parentfef7eedc3ef8610fe8373ee3e739b7e052070a5c
[LoongArch] Implement TargetLowering::isLegalAddressingMode() hook

Use the exact addressing mode information instead of the default to
make better use of offsets in instructions.

Differential Revision: https://reviews.llvm.org/D142874
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
llvm/lib/Target/LoongArch/LoongArchISelLowering.h
llvm/test/CodeGen/LoongArch/ldptr.ll
llvm/test/CodeGen/LoongArch/stptr.ll