This returns true for 8-bit and 16-bit loads, allowing ld.bu/ld.hu to be selected and avoiding unnecessary masks.
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Depends on D154818
Paths
| Differential D154819
[LoongArch] Implement isZextFree ClosedPublic Authored by hev on Jul 10 2023, 1:08 AM.
Details
Summary This returns true for 8-bit and 16-bit loads, allowing ld.bu/ld.hu to be selected and avoiding unnecessary masks. Signed-off-by: WANG Rui <wangrui@loongson.cn> Depends on D154818
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jul 10 2023, 6:14 AM
This revision was landed with ongoing or failed builds.Jul 24 2023, 2:50 AM Closed by commit rG9c21f9554114: [LoongArch] Implement isZextFree (authored by hev, committed by SixWeining). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 539458 llvm/lib/Target/LoongArch/LoongArchISelLowering.h
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
llvm/test/CodeGen/LoongArch/zext-with-load-is-free.ll |
I'm not sure why we cannot do this. But seems that RISCV is the same.