We where missing these cases so something like:
(bitcast to i32 (or v216 x, <2, 1>))
would not be found to be non-zero.
Differential D149409
[ValueTracking] Handle bitcasts between vec-int-ptr in `isKnownNonZero` goldstein.w.n on Apr 27 2023, 11:19 PM. Authored by
Details We where missing these cases so something like: would not be found to be non-zero.
Diff Detail
Event TimelineComment Actions This needs to be much more careful about bitcasts between different lane counts. For your scalar to vector example it's fine, because if each vector element is non-zero then the scalar is also non-zero. The converse, however, is not true.
|
I think this special case is subsumed by the code below, via isPtrOtPtrVectorTy.