[PATCH] D48467: [X86] Recognize an fnma in the presence of an intervening shuffle.
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 17:54:59 PDT 2018
eraman created this revision.
eraman added a reviewer: craig.topper.
Herald added a subscriber: llvm-commits.
For the following sequence
a = _mm256_broadcast_ss(f)
d = _mm256_fnmadd_ps(a, b, c)
the broadcast gets lowered into an insertelement and a shufflevector and
the _mm256_fnmadd_ps gets lowered into an fsub and a call to llvm.fma.
During instcombine, the fsub gets hoisted above the shufflevector. This
causes the fnma pattern to be not recognized during instruction
selection. This patch tries to address this in X86 isel lowering by
swapping the shuffle and negate.
Repository:
rL LLVM
https://reviews.llvm.org/D48467
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx2-fma-fneg-combine.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48467.152418.patch
Type: text/x-patch
Size: 10471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180622/6909e748/attachment.bin>
More information about the llvm-commits
mailing list