[PATCH] D74231: [X86] combineFneg - generalize FMA negations with isNegatibleForFree/getNegatedExpression

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 09:40:22 PST 2020


RKSimon created this revision.
RKSimon added reviewers: spatel, craig.topper, lebedev.ri.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This has a really interesting side effect in that it improves some UMAX/UMIN reduction code which had redundant XOR(SHUFFLE(XOR(X,SIGNMASK)),SIGNMASK) patterns - the isNegatible recognises it as FNEG(SHUFFLE(FNEG(X))).... We have a lot of FNEG patterns bitcasted to the integer domain for XOR signbit twiddling which is similar to what we do to allow UMAX/UMIN to be lowered using SMAX/SMIN.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74231

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/horizontal-reduce-umax.ll
  llvm/test/CodeGen/X86/horizontal-reduce-umin.ll
  llvm/test/CodeGen/X86/vector-reduce-umax.ll
  llvm/test/CodeGen/X86/vector-reduce-umin.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74231.243196.patch
Type: text/x-patch
Size: 28707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200207/6825c4d6/attachment-0001.bin>


More information about the llvm-commits mailing list