[all-commits] [llvm/llvm-project] dc74d7: [X86] getMemoryOpCost - use dyn_cast_or_null<Store...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Jan 5 05:24:03 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc74d7ed1f651aa61d15b4eaaa32200df1f38d37
      https://github.com/llvm/llvm-project/commit/dc74d7ed1f651aa61d15b4eaaa32200df1f38d37
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list