diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-07 17:22:16 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-07 17:22:16 +0000 |
commit | 3db93ac5d6d05b809da1f99379f8fb4a8c27fd0a (patch) | |
tree | 0c0e9491394ac6a7e7adc5cb3557d1c93974004c /llvm/lib/IR/ConstantRange.cpp | |
parent | 32087b65e78f78fc202d8293b5ccda53a3aac21d (diff) | |
download | bcm5719-llvm-3db93ac5d6d05b809da1f99379f8fb4a8c27fd0a.tar.gz bcm5719-llvm-3db93ac5d6d05b809da1f99379f8fb4a8c27fd0a.zip |
Reapply [ValueTracking] Support min/max selects in computeConstantRange()
Add support for min/max flavor selects in computeConstantRange(),
which allows us to fold comparisons of a min/max against a constant
in InstSimplify. This fixes an infinite InstCombine loop, with the
test case taken from D59378.
Relative to the previous iteration, this contains some adjustments for
AMDGPU med3 tests: The AMDGPU target runs InstSimplify prior to codegen,
which ends up constant folding some existing med3 tests after this
change. To preserve these tests a hidden -amdgpu-scalar-ir-passes option
is added, which allows disabling scalar IR passes (that use InstSimplify)
for testing purposes.
Differential Revision: https://reviews.llvm.org/D59506
llvm-svn: 357870
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
0 files changed, 0 insertions, 0 deletions