diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-01-05 19:01:17 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-01-05 19:01:17 +0000 |
commit | 5b6aacf2c1ef0b58333e924743704c7d2a124e6e (patch) | |
tree | c518b8839498dfc63431b4f8680124898e76665e /llvm/tools/llvm-objcopy/llvm-objcopy.cpp | |
parent | 0000060274aec30c7dda9ba4d8752a7cf83f778a (diff) | |
download | bcm5719-llvm-5b6aacf2c1ef0b58333e924743704c7d2a124e6e.tar.gz bcm5719-llvm-5b6aacf2c1ef0b58333e924743704c7d2a124e6e.zip |
[InstCombine] add folds for min(~a, b) --> ~max(a, b)
Besides the bug of omitting the inverse transform of max(~a, ~b) --> ~min(a, b),
the use checking and operand creation were off. We were potentially creating
repeated identical instructions of existing values. This led to infinite
looping after I added the extra folds.
By using the simpler m_Not matcher and not creating new 'not' ops for a and b,
we avoid that problem. It's possible that not using IsFreeToInvert() here is
more limiting than the simpler matcher, but there are no tests for anything
more exotic. It's also possible that we should relax the use checking further
to handle a case like PR35834:
https://bugs.llvm.org/show_bug.cgi?id=35834
...but we can make that a follow-up if it is needed.
llvm-svn: 321882
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
0 files changed, 0 insertions, 0 deletions