[PATCH] D56490: [x86] minimal fix for horizontal binop matching for 256-bit vectors (PR40243)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 9 06:53:39 PST 2019


spatel created this revision.
spatel added reviewers: andreadb, craig.topper, RKSimon.
Herald added a subscriber: mcrosier.

After thinking about it more, the extra code in D56450 <https://reviews.llvm.org/D56450> doesn't add much value if we can't remove the existing matcher. So this is a minimal alternative to that patch.

The existing code is safe/correct for 128-bit ops, but we need to adjust the outputs to account for undefs no matter what.

I still need to convince myself that the last section where we match 256-bit ops is always safe, but this does fix all of the known patterns from PR40243:
https://bugs.llvm.org/show_bug.cgi?id=40243


https://reviews.llvm.org/D56490

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56490.180835.patch
Type: text/x-patch
Size: 6865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/e55933cb/attachment.bin>


More information about the llvm-commits mailing list