[PATCH] D52964: [x86] use demanded bits to simplify masked store codegen

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 6 07:30:30 PDT 2018


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

As noted in https://reviews.llvm.org/D52747, if we prefer IR to use trunc for bool vectors rather than and+icmp, we can expose codegen shortcomings as seen here with masked store.

We can replace a hard-coded PCMPGT simplification with the more general demanded bits call here to improve things. The AVX1 pattern still isn't handled, so that's another potential dependency for the instcombine patch (although I'm not sure how much masked op usage we prefer with only AVX1).


https://reviews.llvm.org/D52964

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/masked_memop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52964.168573.patch
Type: text/x-patch
Size: 4616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181006/aa1a0752/attachment.bin>


More information about the llvm-commits mailing list