[PATCH] D113442: [InstCombine] Enable fold select into operand for FAdd, FMul, FSub and FDiv.

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 06:52:50 PST 2022


xbolva00 added a comment.

In D113442#3281729 <https://reviews.llvm.org/D113442#3281729>, @LuoYuanke wrote:

> This patch cause regression (https://godbolt.org/z/7WYboTe16) on x86 avx512 target, because avx512 has mask instruction which can match select instruction in ISel pattern match. Move select before fadd cause the pattern match fails. I don't quite understand for the optimization opportunity for this transformation. Could you elaborate an example for it?
>
> This patch has side effect on AVX512 ISel. Another example is https://godbolt.org/z/xdr8xs4cb.

Yeah, this patch was commited without checking how this transformation affects x86 codegen. :/ needs to be reverted before LLVM 14.

cc @spatel


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113442



More information about the llvm-commits mailing list