diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-05 21:30:55 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-06 09:43:08 +0200 |
commit | ff218cbc84ff3783cb5ad030397adef8c9e8d444 (patch) | |
tree | 2e78fa293a6b56f2b1b8783444b8f3e997e097cf /llvm/lib/Support/SmallVector.cpp | |
parent | b11db3606ca180521f8400aed730281108b350b4 (diff) | |
download | llvm-ff218cbc84ff3783cb5ad030397adef8c9e8d444.zip llvm-ff218cbc84ff3783cb5ad030397adef8c9e8d444.tar.gz llvm-ff218cbc84ff3783cb5ad030397adef8c9e8d444.tar.bz2 |
[InstSimplify] Fold degenerate abs of abs form
This addresses the remaining issue from D87188. Due to a series of
folds, we may end up with abs-of-abs represented as
x == 0 ? -abs(x) : abs(x). Rather than recognizing this as a special
abs pattern and doing an abs-of-abs fold on it afterwards,
I'm directly folding this to one of the select operands in InstSimplify.
The general pattern falls into the "select with operand replaced"
category, but that fold is not powerful enough to recognize that
both hands of the select are the same for value zero.
Differential Revision: https://reviews.llvm.org/D87197
Diffstat (limited to 'llvm/lib/Support/SmallVector.cpp')
0 files changed, 0 insertions, 0 deletions