aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2023-09-08 16:16:02 +0100
committerGitHub <noreply@github.com>2023-09-08 16:16:02 +0100
commit8669a9f93adb2d3d3ca44a0b0873000927762177 (patch)
tree1d44c21120a5fa562a547e560f2bcc614ca84362 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent6f95737ed4645bf20b33f2d21c93aadd3dcaba27 (diff)
downloadllvm-8669a9f93adb2d3d3ca44a0b0873000927762177.zip
llvm-8669a9f93adb2d3d3ca44a0b0873000927762177.tar.gz
llvm-8669a9f93adb2d3d3ca44a0b0873000927762177.tar.bz2
[AMDGPU] Cope with SelectionDAG::UpdateNodeOperands returning a different SDNode (#65765)
SITargetLowering::adjustWritemask calls SelectionDAG::UpdateNodeOperands to update an EXTRACT_SUBREG node in-place to refer to a new IMAGE_LOAD instruction, before we delete the old IMAGE_LOAD instruction. But in UpdateNodeOperands can do CSE on the fly and return a different EXTRACT_SUBREG node, so the original EXTRACT_SUBREG node would still exist and would refer to the old deleted IMAGE_LOAD instruction. This caused errors like: t31: v3i32,ch = <<Deleted Node!>> # D:1 This target-independent node should have been selected! UNREACHABLE executed at lib/CodeGen/SelectionDAG/InstrEmitter.cpp:1209! Fix it by detecting the CSE case and replacing all uses of the original EXTRACT_SUBREG node with the CSE'd one. Recommit with a fix for a use-after-free bug in the first version of this patch (#65340) which was caught by asan.
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions