aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/clang-format/clang-format-diff.py
diff options
context:
space:
mode:
authorBjörn Pettersson <bjorn.a.pettersson@ericsson.com>2024-08-21 17:56:27 +0200
committerGitHub <noreply@github.com>2024-08-21 17:56:27 +0200
commit278fc8efdf004a1959a31bb4c208df5ee733d5c8 (patch)
tree1f6c7a41dcf17ff378a7ef1bcd7b458ad7c8c075 /clang/tools/clang-format/clang-format-diff.py
parentc0d222219a8d01d3945100114256d26cfe833a1c (diff)
downloadllvm-278fc8efdf004a1959a31bb4c208df5ee733d5c8.zip
llvm-278fc8efdf004a1959a31bb4c208df5ee733d5c8.tar.gz
llvm-278fc8efdf004a1959a31bb4c208df5ee733d5c8.tar.bz2
[DAGCombiner] Fix ReplaceAllUsesOfValueWith mutation bug in visitFREEZE (#104924)
In visitFREEZE we have been collecting a set/vector of MaybePoisonOperands that later was iterated over, applying a freeze to those operands. However, C-level fuzzy testing has discovered that the recursiveness of ReplaceAllUsesOfValueWith may cause later operands in the MaybePoisonOperands vector to be replaced when replacing an earlier operand. That would then turn up as Assertion `N1.getOpcode() != ISD::DELETED_NODE && "Operand is DELETED_NODE!"' failed. failures when trying to freeze those later operands. So we need to make sure that the vector with MaybePoisonOperands is mutated as well when needed. Or as the solution used in this patch, make sure to keep track of operand numbers that should be frozen instead of having a vector of SDValues. And then we can refetch the operands while iterating over operand numbers. The problem was seen after adding SELECT_CC to the set of operations including in "AllowMultipleMaybePoisonOperands". I'm not sure, but I guess that this could happen for other operations as well for which we allow multiple maybe poison operands.
Diffstat (limited to 'clang/tools/clang-format/clang-format-diff.py')
0 files changed, 0 insertions, 0 deletions