[PATCH] D74101: [BPF] implement isTruncateFree and isZExtFree in BPFTargetLowering
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 23:13:10 PST 2020
yonghong-song added a comment.
> arm64 uses this approach, but arm64 doesn't have 8-bit subregisters and it works ?
My mistake due to rush to push the commit to take care of kids :-(
You are right. isTruncateFree does not need check Alu32 Mode and does not need to check 64/32 bits. It seems working fine. I previously added Alu32 check and
strict 64/32 bit check as ultimately the code similar to PowerPC code. Alu32 mode is added since without alu32, truncation probably won't matter much.
This version uses code similar to AArch64, it won't get worse.
The assertion I mentioned will happen for isZExtFree() without checking Alu32.
In that the case (non-alu32 mode), DAG could be optimized as 32-bit ALU but with type marked as TypePromoteInteger, not TypeLegal, which will trigger an assertion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74101/new/
https://reviews.llvm.org/D74101
More information about the llvm-commits
mailing list