[PATCH] D125041: [GlobalISel] Combine G_SHL, G_ASHR, G_SHL of undef shifts to undef.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 11:06:28 PDT 2022
aemerson added a comment.
In D125041#3500128 <https://reviews.llvm.org/D125041#3500128>, @foad wrote:
>> Actually G_SHL with undef LHS needs to be optimized to zero, not undef.
>
> At the IR level, InstSimplify does this for all shifts (in the absence of exact/nsw/nuw flags). See SimplifyRightShift and SimplifyShlInst.
Ok I see. To be more conservative then I'll just fold to undef for the shifts only.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125041/new/
https://reviews.llvm.org/D125041
More information about the llvm-commits
mailing list