diff options
author | Jay Foad <jay.foad@amd.com> | 2023-09-08 16:16:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 16:16:02 +0100 |
commit | 8669a9f93adb2d3d3ca44a0b0873000927762177 (patch) | |
tree | 1d44c21120a5fa562a547e560f2bcc614ca84362 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | |
parent | 6f95737ed4645bf20b33f2d21c93aadd3dcaba27 (diff) | |
download | llvm-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