[all-commits] [llvm/llvm-project] e2537f: [ValueTracking] Replace dyn_cast with dyn_cast_or_...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Feb 8 05:34:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2537f6b1989213b68eabb662b6dd5b4425f43cd
      https://github.com/llvm/llvm-project/commit/e2537f6b1989213b68eabb662b6dd5b4425f43cd
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

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

  Log Message:
  -----------
  [ValueTracking] Replace dyn_cast with dyn_cast_or_null to account for getTerminator returning null

Noticed while running checks on D117995 - a hexagon regression test was managing to return a block without a terminator


  Commit: 146820274820c0d927c2f9e6e3c4967f1beb19ff
      https://github.com/llvm/llvm-project/commit/146820274820c0d927c2f9e6e3c4967f1beb19ff
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstCombine/mul-masked-bits.ll

  Log Message:
  -----------
  [ValueTracking] Add support for X*X self-multiplication

D108992 added KnownBits handling for 'Quadratic Reciprocity' self-multiplication patterns (bit[1] == 0), which can be used for non-undef values (poison is OK).

This patch adds noundef selfmultiply handling to value tracking so demanded bits patterns can make use of it.

Differential Revision: https://reviews.llvm.org/D117995


Compare: https://github.com/llvm/llvm-project/compare/0851970af577...146820274820


More information about the All-commits mailing list