[PATCH] D37236: [InstCombine] add insertelement + shuffle demanded element fold

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 14:55:33 PDT 2017


spatel updated this revision to Diff 113319.
spatel added a comment.

Patch updated:
Use @craig.topper 's suggested change to keep recursing in SimplifyDemandedVectorElts before replacing an operand.

This is a small change that fixes the case that motivated me to look here in the first place. I added a test case that would have been caught by my initial patch in https://reviews.llvm.org/rL312172, so we don't lose it. Eventually, I think we should make a separate pass to better simplify based on vector demanded elements without further burdening instcombine.


https://reviews.llvm.org/D37236

Files:
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  test/Transforms/InstCombine/X86/x86-pshufb.ll
  test/Transforms/InstCombine/vec_demanded_elts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37236.113319.patch
Type: text/x-patch
Size: 6016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170830/4b46bc3b/attachment.bin>


More information about the llvm-commits mailing list