[PATCH] D68651: [InstCombine] Signed saturation patterns
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 11:42:58 PDT 2019
nikic accepted this revision.
nikic added a comment.
LG
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2053
+ if (A->getType()->getScalarType()->getIntegerBitWidth() > NewBitWidth ||
+ B->getType()->getScalarType()->getIntegerBitWidth() > NewBitWidth)
+ return nullptr;
----------------
I'd use `Ty->getScalarSizeInBits()` rather than `Ty->getScalarType()->getIntegerBitWidth()` here and above. I believe that's idiomatic even if we're dealing specifically in integers.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68651/new/
https://reviews.llvm.org/D68651
More information about the llvm-commits
mailing list