[PATCH] D110170: [InstCombine] fold cast of right-shift if high bits are not demanded
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 21 10:17:06 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:397
+ if (C->ult(I->getType()->getScalarSizeInBits()) &&
+ C->ule(DemandedMask.countLeadingZeros())) {
+ // trunc (lshr X, C) --> lshr (trunc X), C
----------------
I think this is only part of the check.
https://alive2.llvm.org/ce/z/59fb7i => https://alive2.llvm.org/ce/z/s_G7u7
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110170/new/
https://reviews.llvm.org/D110170
More information about the llvm-commits
mailing list