HomePhabricator

SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without…

Description

SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)

The code was previously checking that candidates for sinking had exactly
one use or were a store instruction (which can't have uses). This meant
we could sink call instructions only if they had a use.

That limitation seemed a bit arbitrary, so this patch changes it to
"instruction has zero or one use" which seems more natural and removes
the need to special-case stores.

Differential revision: https://reviews.llvm.org/D59936

Event Timeline

I had to revert this in rL360086. I'm following up offline to see if I can narrow down what the issue is.