[X86] getMemoryOpCost - use dyn_cast_or_null<StoreInst>. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 5 Jan 2021 12:07:38 +0000 (12:07 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 5 Jan 2021 13:23:09 +0000 (13:23 +0000)
commitdc74d7ed1f651aa61d15b4eaaa32200df1f38d37
tree8985bd520e0b3a0b077ab64526f6f5e21bf294fb
parent489000d8516da7eaf6aabaad11cce0ed7e67c61f
[X86] getMemoryOpCost - use dyn_cast_or_null<StoreInst>. NFCI.

Use instead of the isa_and_nonnull<StoreInst> and use the StoreInst::getPointerOperand wrapper instead of a hardcoded Instruction::getOperand.

Looks cleaner and avoids a spurious clang static analyzer null dereference warning.
llvm/lib/Target/X86/X86TargetTransformInfo.cpp