This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner][RISCV] Return SDValue(N, 0) instead of SDValue() after 2 calls to CombineTo in visitSTORE.
ClosedPublic

Authored by craig.topper on Aug 17 2023, 12:42 PM.

Details

Summary

RISC-V found a case where the CombineTo caused N to be CSEd with
an existing node and then deleted. The top level DAGCombiner loop
was surprised to find a node was deleted, but SDValue() was returned
from the visit function.

We need to return SDValue(N, 0) to tell the top level loop that
a change was made, but the worklist updates were already handled.

Fixes #64772.

Diff Detail

Unit TestsFailed

Event Timeline

craig.topper created this revision.Aug 17 2023, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2023, 12:42 PM
craig.topper requested review of this revision.Aug 17 2023, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2023, 12:42 PM
arsenm accepted this revision.Aug 17 2023, 3:07 PM
This revision is now accepted and ready to land.Aug 17 2023, 3:07 PM
This revision was landed with ongoing or failed builds.Aug 17 2023, 3:17 PM
This revision was automatically updated to reflect the committed changes.