summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-12-11 11:18:09 -0500
committerSanjay Patel <spatel@rotateright.com>2019-12-11 13:30:39 -0500
commitd1f0bdf2d2df9bdf11ee2ddfff3df50e53f2f042 (patch)
treed8ff7e8e6e718370607f772a1a62f737375cf00d /lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp
parentd8c31d41989b0748e2e5b8d7fa9cf7e7023bcbff (diff)
downloadbcm5719-llvm-d1f0bdf2d2df9bdf11ee2ddfff3df50e53f2f042.tar.gz
bcm5719-llvm-d1f0bdf2d2df9bdf11ee2ddfff3df50e53f2f042.zip
[SDAG] remove use restriction in isNegatibleForFree() when called from getNegatedExpression()
This is an alternate fix for the bug discussed in D70595. This also includes minimal tests for other in-tree targets to show the problem more generally. We check the number of uses as a predicate for whether some value is free to negate, but that use count can change as we rewrite the expression in getNegatedExpression(). So something that was marked free to negate during the cost evaluation phase becomes not free to negate during the rewrite phase (or the inverse - something that was not free becomes free). This can lead to a crash/assert because we expect that everything in an expression that is negatible to be handled in the corresponding code within getNegatedExpression(). This patch skips the use check during the rewrite phase. So we determine that some expression isNegatibleForFree (identically to without this patch), but during the rewrite, don't rely on use counts to decide how to create the optimal expression. Differential Revision: https://reviews.llvm.org/D70975
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud