[PATCH] D81993: [AArch64][GlobalISel] Add post-legalize combine for sext(trunc(sextload)) -> trunc/copy
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 19 13:04:30 PDT 2020
aemerson marked an inline comment as done.
aemerson added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:588
+ LoadUser = TruncSrc;
+
+ uint64_t SizeInBits = MI.getOperand(2).getImm();
----------------
arsenm wrote:
> This is just a special case of checking computeNumSignBits? Do we recognize the number of sign bits in a sextload yet?
We don't, but using computeNumSignBits doesn't tell us how to find the original def in the chain that has redundantly been sign extended. E.g. in this case we won't know how to look through the truncate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81993/new/
https://reviews.llvm.org/D81993
More information about the llvm-commits
mailing list