[PATCH] D67800: [InstCombine] Fold a shifty implementation of clamp (e.g., clamp255).
Huihui Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 18:09:49 PDT 2019
huihuiz added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2689
+ m_APInt(ShAmt)))) &&
+ *ShAmt == Ty->getScalarSizeInBits() - 1) {
+ Value *NewICmpInst =
----------------
lebedev.ri wrote:
> As per the alive, this isn't needed?
Shift amount need to be type ScalarSizeInBits - 1, see https://rise4fun.com/Alive/nPP
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67800/new/
https://reviews.llvm.org/D67800
More information about the llvm-commits
mailing list