[all-commits] [llvm/llvm-project] 8a3659: [SCCP] Use constant ranges for binary operators.
Florian Hahn via All-commits
all-commits at lists.llvm.org
Thu Mar 19 02:36:06 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 8a36594a7ec1dba26686d1fb8bd6b56500bc4717
https://github.com/llvm/llvm-project/commit/8a36594a7ec1dba26686d1fb8bd6b56500bc4717
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-03-19 (Thu, 19 Mar 2020)
Changed paths:
M llvm/lib/Transforms/Scalar/SCCP.cpp
M llvm/test/Transforms/SCCP/binaryops-range-special-cases.ll
A llvm/test/Transforms/SCCP/ip-ranges-binaryops.ll
M llvm/test/Transforms/SCCP/range-and.ll
M llvm/test/Transforms/SCCP/vector-bitcast.ll
Log Message:
-----------
[SCCP] Use constant ranges for binary operators.
If one of the operands of a binary operator is a constant range, we can
use ConstantRange::binaryOp to approximate the result.
We still handle single element constant ranges as we did previously,
with ConstantExpr::get(), because ConstantRange::binaryOp still gives
worse results in a few cases for single element ranges.
Also note that we bail out early if any of the operands is still unknown.
Reviewers: davide, efriedma, mssimpso
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D71936
More information about the All-commits
mailing list