aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-08-17 07:31:05 -0400
committerSanjay Patel <spatel@rotateright.com>2021-08-17 08:10:42 -0400
commitd0975b7cb0e184e8e5f3975183c51937dfa4043a (patch)
treea0497d4a1ad975d4618c57c41815a340f6123252 /llvm/lib/Object/ELFObjectFile.cpp
parent8fb269d94075c70b676ff8b7c8baf695cc66c74f (diff)
downloadllvm-d0975b7cb0e184e8e5f3975183c51937dfa4043a.zip
llvm-d0975b7cb0e184e8e5f3975183c51937dfa4043a.tar.gz
llvm-d0975b7cb0e184e8e5f3975183c51937dfa4043a.tar.bz2
[InstCombine] fold signed min/max intrinsics with negated operands
If both operands are negated, we can invert the min/max and do the negation after: smax (neg nsw X), (neg nsw Y) --> neg nsw (smin X, Y) smin (neg nsw X), (neg nsw Y) --> neg nsw (smax X, Y) This is visible as a remaining regression in D98152. I don't see a way to generalize this for 'unsigned' or adapt Negator to handle it. This only appears to be safe with 'nsw': https://alive2.llvm.org/ce/z/GUy1zJ Differential Revision: https://reviews.llvm.org/D108165
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions