Recommit "[SCCP] Support NUW/NSW inference for all overflowing binary operators."
authorFlorian Hahn <flo@fhahn.com>
Mon, 30 Jan 2023 20:15:28 +0000 (20:15 +0000)
committerFlorian Hahn <flo@fhahn.com>
Mon, 30 Jan 2023 20:15:28 +0000 (20:15 +0000)
commit7d10213317c18e1d24753e5532d2b037db2d2c5c
treef3571f4daa1200ee6485063e700aa032e5efccbe
parent022d0c6e300300d64a505e2998f066ef81a22784
Recommit "[SCCP] Support NUW/NSW inference for all overflowing binary operators."

This reverts commit 43acb61a08fffada31fb2e20e45fcc8492ef76b9.

Recommit the patch after fixing the issue causing the revert in 4e607ec4987.
Extra tests have been added in 5c6cb61ad416a544.

Original commit message:

   Extend the NUW/NSW inference logic add in 72121a20cd and cdeaf5f28c3dc
    to all overflowing binary operators.

    Reviewed By: nikic

    Differential Revision: https://reviews.llvm.org/D142721
llvm/lib/Transforms/Utils/SCCPSolver.cpp
llvm/test/Transforms/SCCP/ip-constant-ranges.ll
llvm/test/Transforms/SCCP/ip-ranges-binaryops.ll
llvm/test/Transforms/SCCP/sub-nuw-nsw-flags.ll
llvm/test/Transforms/SCCP/ub-shift.ll
llvm/test/Transforms/SCCP/widening.ll