[PATCH] D12935: [InstCombine] Improve Vector Demanded Bits Through Bitcasts

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 07:46:38 PDT 2015


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

Currently SimplifyDemandedVectorElts can only peek through bitcasts if the vectors have the same number of elements.

This patch fixes and enables some existing (disabled) code to support bitcasting to vectors with more/fewer elements. It currently only accepts cases when vectors alias cleanly (i.e. number of elements are an exact multiple of the other vector).

This was added to improve the demanded vector elements support for SSE vector shifts which require the __m128i (<2 x i64>) argument type to be bitcast to the vector type for the builtin shift. I've added extra tests for various additional bitcasts.

Repository:
  rL LLVM

http://reviews.llvm.org/D12935

Files:
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  test/Transforms/InstCombine/x86-vector-shifts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12935.34995.patch
Type: text/x-patch
Size: 7510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150917/b811f9b5/attachment.bin>


More information about the llvm-commits mailing list