[PATCH] D77890: [ValueTracking] Implement isPoisonIf and canPushFreezeIntoOperands
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 13:35:05 PDT 2020
spatel added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4603-4604
+ case Instruction::SDiv:
+ case Instruction::URem:
+ case Instruction::SRem:
+ return !I->isExact();
----------------
URem/SRem are not PossiblyExactOperator, so I think this will assert. Please add at least 1 test to confirm.
Would it be better to create a preliminary "canCreatePoison()" helper function that is structured like Instruction::andIRFlags() and return 'false' on any of those instructions?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77890/new/
https://reviews.llvm.org/D77890
More information about the llvm-commits
mailing list