[PATCH] D76928: [InstCombine][X86] Simplify demanded elts in SSE intrinsics with repeated args (PR24523)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 08:13:00 PDT 2020


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

If we are repeating the same argument in SSE cmp/min/max ops and the op is the only user of that arg value, then we know that these are the only demanded elts we require and can be more aggressive with the recursive SimplifyDemandedElts call.

This required the addition of a Value::isOnlyUserOf helper, similar in function to the SDNode version.

Fixes PR24523.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76928

Files:
  llvm/include/llvm/IR/Value.h
  llvm/lib/IR/Value.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/test/Transforms/InstCombine/X86/x86-sse.ll
  llvm/test/Transforms/InstCombine/X86/x86-sse2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76928.253124.patch
Type: text/x-patch
Size: 7148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200327/6abc428f/attachment.bin>


More information about the llvm-commits mailing list