[PATCH] D91729: [PowerPC] dyn_cast should be dyn_cast_or_null in MASSV pass
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 17:12:38 PST 2020
steven.zhang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp:108
if (Constant *Exp = dyn_cast<Constant>(CI->getArgOperand(1)))
- if (ConstantFP *CFP = dyn_cast<ConstantFP>(Exp->getSplatValue())) {
+ if (ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(Exp->getSplatValue())) {
// If the argument is 0.75 or 0.25 it is cheaper to turn it into pow
----------------
It seems that some of the test change is not relative with this.(i.e. rename the func name) And the only test change I can imagine is that, some case that we hit ice before now it is passed. That is, if Exp->getSplatValue() return null, dyn_cast will hit ice before. But I didn't see such kind of test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91729/new/
https://reviews.llvm.org/D91729
More information about the llvm-commits
mailing list