[PATCH] D28249: Improve scheduling with branch coalescing

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 11:15:53 PST 2017


nemanjai added a comment.

In https://reviews.llvm.org/D28249#681685, @hiraditya wrote:

> Because select gets converted to branches in PowerPC, I was wondering if there is a  way to not generate selects in the first place.


It is not true in general that selects get converted to branches on PowerPC. For example, integer selects can be lowered into an actual "integer select" instruction under the "right" circumstances.
I'm sure there **is** a way to prevent the selects from being produced, but I am not sure this would have any effect on this optimization. For the specific test case that is added as part of this patch, it appears that SROA produces the selects. I haven't personally looked at the semantics of SROA and the heuristics it uses to produce a select or not, but there is presumably a way to tell it not to do so.


https://reviews.llvm.org/D28249





More information about the llvm-commits mailing list