[ConstantFolding] fold abs intrinsic
authorSanjay Patel <spatel@rotateright.com>
Fri, 31 Jul 2020 15:50:39 +0000 (11:50 -0400)
committerSanjay Patel <spatel@rotateright.com>
Fri, 31 Jul 2020 18:08:44 +0000 (14:08 -0400)
commite591713bff1fdec8fe2b09d084b5cf665794cb65
tree29457c9bcec96c0e380cdc6d9528c6c6f5ed8166
parent6a3b07a4bf14be32569550f2e9814d8797d27d31
[ConstantFolding] fold abs intrinsic

The handling for minimum value is similar to cttz/ctlz with 0 just above this case.

Differential Revision: https://reviews.llvm.org/D84942
llvm/lib/Analysis/ConstantFolding.cpp
llvm/test/Analysis/ConstantFolding/abs.ll