HomePhabricator

[InstCombine] Fix store merge worklist management (PR46680)
eb3c5db40a14Unpublished

Authored by nikic on Jul 18 2020, 1:22 PM.

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

[InstCombine] Fix store merge worklist management (PR46680)

Fixes https://bugs.llvm.org/show_bug.cgi?id=46680.

Just like insertions through IRBuilder, InsertNewInstBefore()
should be using the deferred worklist mechanism, so that processing
of newly added instructions is prioritized.

There's one side-effect of the worklist order change which could be
classified as a regression. An add op gets pushed through a select
that at the time is not a umax. We could add a reverse transform
that tries to push adds in the reverse direction to restore a min/max,
but that seems like a sure way of getting infinite loops... Seems
like something that should best wait on min/max intrinsics.

Differential Revision: https://reviews.llvm.org/D84109

(cherry picked from commit d12ec0f752e7f2c7f7252539da2d124264ec33f7)

Details

Committed
hansJul 23 2020, 6:13 AM
Differential Revision
D84109: [InstCombine] Fix store merge worklist management
Parents
rG826f730f3f1e: [InstCombine] Add test for PR46680 (NFC)
Branches
Unknown
Tags
Unknown