aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
diff options
context:
space:
mode:
authorAndrew Savonichev <andrew.savonichev@gmail.com>2025-10-24 09:43:10 +0900
committerGitHub <noreply@github.com>2025-10-24 09:43:10 +0900
commit6ed814a823258fa357c25bd71e76eb688fbbff79 (patch)
tree6c6f3237331c1e1087aa0eebd9d999147d7ae433 /llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
parent169626f11ab19a0b33fba2ca84cf4d9ec2b76fb1 (diff)
downloadllvm-6ed814a823258fa357c25bd71e76eb688fbbff79.zip
llvm-6ed814a823258fa357c25bd71e76eb688fbbff79.tar.gz
llvm-6ed814a823258fa357c25bd71e76eb688fbbff79.tar.bz2
[IR] Fix Module::setModuleFlag for uniqued metadata (#164580)
`Module::setModuleFlag` is supposed to change a single module. However, when an `MDNode` has the same value in more than one module in the same `LLVMContext`, such `MDNode` is shared (uniqued) across all of them. Therefore `MDNode::replaceOperandWith` changes all modules that share the same `MDNode`. This used to cause problems for #86212, where a module is marked as "upgraded" via a module flag. When this flag is shared across multiple modules, all of them are marked, yet some may not have been processed at all. After the patch we now construct a new `MDNode` and replace the old one.
Diffstat (limited to 'llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp')
0 files changed, 0 insertions, 0 deletions