[all-commits] [llvm/llvm-project] fd1094: [ConstantFolding] Clean up Intrinsics::abs undef h...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Jan 10 09:08:09 PST 2022


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

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp

  Log Message:
  -----------
  [ConstantFolding] Clean up Intrinsics::abs undef handling

Match cttz/ctlz handling by assuming C1 == 0 if C1 != 1 - I've added an assertion as well.

Fixes static analyzer nullptr dereference warnings.




More information about the All-commits mailing list