[PATCH] D39183: [SelectionDAG] Add BITCAST handling of bitwise operations to ComputeNumSignBits

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 08:37:10 PDT 2017


RKSimon created this revision.

We often bitcast for bitwise ops before bitcasting back to the original value type (promotion etc.):

v16i8 result = bitcast( v16i8, and( bitcast( v2i64, v16i8 x ), bitcast( v2i64, v16i8 y ) ) )

In such cases, we can safely peek through the bitcasts to determine the the minimum number of sign bits.


Repository:
  rL LLVM

https://reviews.llvm.org/D39183

Files:
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/X86/bitcast-and-setcc-128.ll
  test/CodeGen/X86/bitcast-and-setcc-256.ll
  test/CodeGen/X86/widen_arith-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39183.119857.patch
Type: text/x-patch
Size: 8339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171023/d71c2a1d/attachment.bin>


More information about the llvm-commits mailing list