[PATCH] D11764: [DAGCombiner] Attempt to mask vectors before zero extension instead of after.

Simon Pilgrim llvm-dev at redking.me.uk
Wed Aug 5 08:24:03 PDT 2015


RKSimon created this revision.
RKSimon added reviewers: chandlerc, uweigand, andreadb, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

For cases where we TRUNCATE and then ZERO_EXTEND to a larger size (often from vector legalization), see if we can mask the source data and then ZERO_EXTEND (instead of after a ANY_EXTEND). This can help avoid having to generate a larger mask, and possibly applying it to several sub-vectors.

(zext (truncate x)) -> (zext (and(x, m))

This is the first of a number of minor patches to help improve the conversion of byte masks to clear mask shuffles.

Ulrich - this includes some test changes in SystemZ, please can you check them? A quick search inducates they make sense but I want to make sure.

Repository:
  rL LLVM

http://reviews.llvm.org/D11764

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/SystemZ/insert-05.ll
  test/CodeGen/SystemZ/int-conv-04.ll
  test/CodeGen/SystemZ/int-conv-08.ll
  test/CodeGen/X86/avx2-conversions.ll
  test/CodeGen/X86/vec_cast2.ll
  test/CodeGen/X86/vector-zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11764.31353.patch
Type: text/x-patch
Size: 12350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150805/3237214d/attachment.bin>


More information about the llvm-commits mailing list