aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-10-07 13:52:25 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-10-07 15:09:50 +0300
commitfed0f890e5698a7a408acaf0aa23319e918f6a2a (patch)
tree7cea5b395e706f9e03daa0136d5fc90a41e05977 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf71f5f39f670075f7b653b1e1a6bd24e5c8f099e (diff)
downloadllvm-fed0f890e5698a7a408acaf0aa23319e918f6a2a.zip
llvm-fed0f890e5698a7a408acaf0aa23319e918f6a2a.tar.gz
llvm-fed0f890e5698a7a408acaf0aa23319e918f6a2a.tar.bz2
InstCombine: Negator: don't rely on complexity sorting already being performed (PR47752)
In some cases, we can negate instruction if only one of it's operands negates. Previously, we assumed that constants would have been canonicalized to RHS already, but that isn't guaranteed to happen, because of InstCombine worklist visitation order, as the added test (previously-hanging) shows. So if we only need to negate a single operand, we should ensure ourselves that we try constant operand first. Do that by re-doing the complexity sorting ourselves, when we actually care about it. Fixes https://bugs.llvm.org/show_bug.cgi?id=47752
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions