This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] CSE nodes with differing SDNodeFlags
ClosedPublic

Authored by sunfish on Jan 7 2016, 10:16 AM.

Details

Summary

In the optimizer (GVN etc.) when eliminating redundant nodes with different flags, the flags are ignored for the purposes of testing for congruence, and then intersected for the purposes of producing a result that supports the union of all the uses. Attached is a rough patch which implements the same policy for SelectionDAG's CSE, which fixed the testcases in PR26063 and which I'm posting now to get feedback on the approach.

Diff Detail

Repository
rL LLVM

Event Timeline

sunfish updated this revision to Diff 44227.Jan 7 2016, 10:16 AM
sunfish retitled this revision from to [SelectionDAG] CSE nodes with differing SDNodeFlags.
sunfish updated this object.
sunfish set the repository for this revision to rL LLVM.
sunfish added subscribers: llvm-commits, jmolloy, hfinkel, sanjoy.
spatel added a subscriber: spatel.Jan 7 2016, 1:06 PM
hfinkel accepted this revision.Jan 12 2016, 5:23 PM
hfinkel added a reviewer: hfinkel.

This seems like the most-useful approach (LGTM).

test/CodeGen/ARM/cse-flags.ll
54

Please cleanup the unneeded function attributes and metadata.

This revision is now accepted and ready to land.Jan 12 2016, 5:23 PM
This revision was automatically updated to reflect the committed changes.
test/CodeGen/ARM/cse-flags.ll