[all-commits] [llvm/llvm-project] 663830: [LoopFlatten] checkOverflow - use cast<> instead o...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Jan 6 06:14:06 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66383038699d302fd82841d8d68f662f46e8f94b
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-06 (Thu, 06 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopFlatten.cpp

  Log Message:
  [LoopFlatten] checkOverflow - use cast<> instead of dyn_cast<> to avoid dereference of nullptr.

Fix static analysis warning by using cast<> instead of dyn_cast<> as both isa<> and isGuaranteedToExecuteForEveryIteration expect a non-null Instruction pointer.

More information about the All-commits mailing list