[PATCH] D41927: DAGCombine: Let truncates negate extension through extract-subvector

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 16:51:43 PST 2018


zvi created this revision.
zvi added reviewers: RKSimon, craig.topper, spatel, efriedma.

Fold cases such as:
(v8i8 truncate (v8i32 extract_subvector (v16i32 sext (v16i8 V), Idx)))
->
(v8i8 extract_subvector (v16i8 V), Idx)

This can be generalized to cases where the truncate and extend do not
fully cancel each other out, but it may require querying the target
about profitability.


https://reviews.llvm.org/D41927

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/madd.ll
  test/CodeGen/X86/trunc-subvector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41927.129373.patch
Type: text/x-patch
Size: 9718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180111/83a6e2a0/attachment.bin>


More information about the llvm-commits mailing list