[PATCH] D84109: [InstCombine] Fix store merge worklist management
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 13:33:36 PDT 2020
nikic created this revision.
nikic added reviewers: lebedev.ri, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84109
Files:
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/minmax-fold.ll
llvm/test/Transforms/InstCombine/pr46680.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84109.279024.patch
Type: text/x-patch
Size: 6756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200718/79720b42/attachment.bin>
More information about the llvm-commits
mailing list