Re: Update on A * (1 - uitofp i1 C) + B * uitofp i1 C —> select C, B, A
Evan Cheng
evan.cheng at apple.com
Tue May 21 22:28:57 PDT 2013
LGTM.
Evan
Sent from my iPad
On May 21, 2013, at 7:03 PM, Jean-Luc Duprat <jduprat at apple.com> wrote:
> This is an update to a previous commit (r181216).
>
> The earlier change list introduced the following inst combines:
> B * (uitofp i1 C) —> select C, B, 0
> A * (1 - uitofp i1 C) —> select C, 0, A
> select C, 0, B + select C, A, 0 —> select C, A, B
>
> Together these 3 changes would simplify :
> A * (1 - uitofp i1 C) + B * uitofp i1 C
> down to :
> select C, B, A
>
> In practice we found that the first two substitutions can have a negative effect on performance, because they reduce opportunities to use FMA contractions; between the two options FMAs are often the better choice. This change list amends the previous one to enable just these inst combines:
>
> select C, B, 0 + select C, 0, A —> select C, B, A
> A * (1 - uitofp i1 C) + B * uitofp i1 C —> select C, B, A
>
>
> Feedback appreciated,
>
> JL
>
>
> <blendWithoutCompromisingFMA.patch>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list