[PATCH] D87698: [SelectionDAG] Check any use of negation result before removal
Qiu Chaofan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 08:05:30 PDT 2020
qiucf created this revision.
qiucf added reviewers: RKSimon, spatel, efriedma, steven.zhang, hans, PowerPC.
Herald added subscribers: llvm-commits, ecnelises, hiraditya.
Herald added a project: LLVM.
qiucf requested review of this revision.
D87614 <https://reviews.llvm.org/D87614> fixed a bug about constant removal in negation. But after sanitizing check I found there's still some issue about it so it's reverted.
Temporary nodes will be removed if useless in negation. Before the removal, they'd be checked if any other nodes used it. So the removal was moved after `getNode`. However in rare cases the node to be removed is the same as result of `getNode`. We missed that.
The part is fragile, so we need to be careful about it..
https://reviews.llvm.org/D87698
Files:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/pr47517.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87698.291931.patch
Type: text/x-patch
Size: 3381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200915/f142444b/attachment.bin>
More information about the llvm-commits
mailing list