[PATCH] D68022: [InstCombine] Don't assume CmpInst has been visited in getFlippedStrictnessPredicateAndConstant
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 07:30:46 PDT 2019
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
LG, sorry for the breakage!
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5139-5140
// For vectors, we must handle the edge cases.
if (isa<ConstantInt>(C)) {
+ if (!ConstantIsOk(cast<ConstantInt>(C)))
+ return llvm::None;
----------------
```
if (auto* CI = dyn_cast<ConstantInt>(C)) {
if (!ConstantIsOk(CI))
return llvm::None;
```
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5144-5146
// TODO? If the edge cases for vectors were guaranteed to be handled as they
// are for scalar, we could remove the min/max checks. However, to do that,
// we would have to use insertelement/shufflevector to replace edge values.
----------------
Comment needs updating - the scalar case is no longer guaranteed to be handled,
so we can't talk about in the vector case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68022/new/
https://reviews.llvm.org/D68022
More information about the llvm-commits
mailing list