[PATCH] D62629: [InstCombine] Update fptrunc (fneg x)) -> (fneg (fptrunc x) for unary FNeg

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 10:03:50 PDT 2019


cameron.mcinally added a comment.

In D62629#1536451 <https://reviews.llvm.org/D62629#1536451>, @spatel wrote:

> In D62629#1536402 <https://reviews.llvm.org/D62629#1536402>, @cameron.mcinally wrote:
>
> > Check hasOneUse() before performing combine.
>
>
> That's an independent fix and needs a test?


It's actually covered by the new @unary_neg_trunc_op1_extra_use and existing @neg_trunc_op1_extra_use tests. I missed that each was producing an extra instruction in my Diff before the hasOneUse() change. I had failed to copy over that check to the new code from the old BinaryOperator code above this.

Also, I just noticed I failed to add context to this patch. Will do so now...


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

https://reviews.llvm.org/D62629





More information about the llvm-commits mailing list