diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-04-01 14:32:13 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-04-01 15:05:13 -0400 |
commit | 3d9004879118c734fd9a5e112fb2bf22cf647668 (patch) | |
tree | 89bffa7bba03d4316025e00ffda7a033808d386e /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 8431dbacd495e51f5bbb46d1af9042520098cd75 (diff) | |
download | llvm-3d9004879118c734fd9a5e112fb2bf22cf647668.zip llvm-3d9004879118c734fd9a5e112fb2bf22cf647668.tar.gz llvm-3d9004879118c734fd9a5e112fb2bf22cf647668.tar.bz2 |
[InstCombine] enhance freelyNegateValue() by handling xor
Negation is equivalent to bitwise-not + 1, so try to convert more
subtracts into adds using this relationship:
0 - (A ^ C) => ((A ^ C) ^ -1) + 1 => A ^ ~C + 1
I doubt this will recover the regression noted in rGf2fbdf76d8d0,
but seems like we're going to need to improve here and/or revive D68408?
Alive2 proofs:
http://volta.cs.utah.edu:8080/z/Re5tMU
http://volta.cs.utah.edu:8080/z/An-uns
Differential Revision: https://reviews.llvm.org/D77230
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
0 files changed, 0 insertions, 0 deletions