[ConstantRange][CVP] Make use of abs poison flag
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 30 Jul 2020 20:54:53 +0000 (22:54 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 30 Jul 2020 21:06:10 +0000 (23:06 +0200)
commit9ebeac678855a1bc2492a9630f0300518e2755dc
tree5d296367d7378df02e3a0f2aca23f9b4c4adaa85
parentafae6d97fa55984003321245ec6ceb5af9cc5856
[ConstantRange][CVP] Make use of abs poison flag

Pass the abs poison flag to the underlying ConstantRange
implementation, allowing CVP to simplify based on it.

Importantly, this recognizes that abs with poison flag is actually
non-negative...
llvm/lib/IR/ConstantRange.cpp
llvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll