[all-commits] [llvm/llvm-project] f1f31e: [unittests] Add a few tests for computeKnownBits w...

qcolombet via All-commits all-commits at lists.llvm.org
Thu Oct 8 11:35:24 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f1f31eb2daab3bfc1e6e290f33eb7aea472f0ce5
      https://github.com/llvm/llvm-project/commit/f1f31eb2daab3bfc1e6e290f33eb7aea472f0ce5
  Author: Quentin Colombet <qcolombet at apple.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M llvm/unittests/Analysis/ValueTrackingTest.cpp

  Log Message:
  -----------
  [unittests] Add a few tests for computeKnownBits with ranges

These tests make sure that the range information is properly
understood during computeKnownBits analysis.

NFC

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


  Commit: 9431f8ad2e033b3c7629ff74fe41d7c42a9554f8
      https://github.com/llvm/llvm-project/commit/9431f8ad2e033b3c7629ff74fe41d7c42a9554f8
  Author: Quentin Colombet <qcolombet at apple.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/Support/KnownBits.cpp
    M llvm/unittests/Support/KnownBitsTest.cpp

  Log Message:
  -----------
  [KnownBits] Add a computeForMul method

This patch refactors the logic in ValueTracking.cpp so that
computeKnownBitsForMul now uses a helper function from KnownBits.

NFC

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


  Commit: d421e0484afd9a951ddf8c986febaf9c3743dc0c
      https://github.com/llvm/llvm-project/commit/d421e0484afd9a951ddf8c986febaf9c3743dc0c
  Author: Quentin Colombet <qcolombet at apple.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h
    M llvm/unittests/Support/KnownBitsTest.cpp

  Log Message:
  -----------
  [KnownBits] Add a sextOrTrunc method

We already offer zextOrTrunc and it seems natural to offer the
same capability for sign extension.

This patch is a preparatory addition useful for future computeKnownBits
developments.

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


Compare: https://github.com/llvm/llvm-project/compare/504bc07d1afc...d421e0484afd


More information about the All-commits mailing list