[PATCH] D77319: [DAGCombine] Remove the getNegatibleCost to avoid the out of sync with getNegatedExpression

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 01:02:33 PDT 2020


steven.zhang added a comment.

In D77319#1958627 <https://reviews.llvm.org/D77319#1958627>, @steven.zhang wrote:

> In D77319#1957709 <https://reviews.llvm.org/D77319#1957709>, @efriedma wrote:
>
> > Can you split whatever change affects the PPC tests into a separate patch, if it's not too tricky?
>
>
> Yes, I am trying to do it, and that is the main reason why this revision is in WIP status.  It seems that we have different combine  order for that case that result in different combination result, though they are semantics the same. I will take a deep look at this.


I cannot as it is tricky... We are creating some nodes during negate the expression, and these nodes will be deleted by recursivelyDeleteUnusedNodes() when we are trying another run of the combine. But their operands will be push into the worklist and keep it if their use is not empty. That means, we might change the order of the instructions to combine. For this case, the order matters the instruction selection, so, we see the changes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77319/new/

https://reviews.llvm.org/D77319





More information about the llvm-commits mailing list