This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Add BITCAST handling of bitwise operations to ComputeNumSignBits
AbandonedPublic

Authored by RKSimon on Oct 23 2017, 8:37 AM.

Details

Summary

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 minimum number of sign bits.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Oct 23 2017, 8:37 AM
RKSimon edited the summary of this revision. (Show Details)Oct 23 2017, 10:49 AM
RKSimon planned changes to this revision.Oct 23 2017, 12:59 PM

Looking at alternative ways I might be able to do this

RKSimon abandoned this revision.Oct 24 2017, 1:29 PM

Abandoning, this was fixed mainly by rL316383