[PATCH] D61426: [X86][SSE] lowerAddSubToHorizontalOp - enable ymm extraction+fold

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 03:36:56 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: spatel, andreadb, craig.topper.
Herald added a project: LLVM.

Limiting scalar hadd/hsub generation to the lowest xmm looks to be unnecessary - we will be extracting one upper xmm whatever, and we can remove a shuffle by using the hop which is inline with what shouldUseHorizontalOp expects to happen anyway.

Testing on btver2 (the main target for fast-hops) shows this is beneficial even for float ops where we have a 'shuffle' to extract the float result:
https://godbolt.org/z/0R-U-K


Repository:
  rL LLVM

https://reviews.llvm.org/D61426

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/haddsub.ll
  test/CodeGen/X86/phaddsub-extract.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61426.197733.patch
Type: text/x-patch
Size: 10105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190502/21d5433a/attachment.bin>


More information about the llvm-commits mailing list