[PATCH] D32582: [InstCombine] Add range metadata to cttz/ctlz/ctpop intrinsic calls based on known bits

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 04:02:21 PDT 2017


RKSimon added a comment.

In https://reviews.llvm.org/D32582#772572, @craig.topper wrote:

> I lifted the scalar restriction on the existing code over the weekend.
>
> I'm having trouble getting range metadata to work with vectors. One piece of code said "Range types must match instruction type!", but computeKnownBitsFromRangeMetadata assumes metadata is scalar. I haven't found any examples of vector range metadata so I don't know what the right answer is.


For this patch, I'd be happy with just adding vector tests to show how they are currently affected.

Ideally metadata for vectors would be per-element, but its more likely that it'd match knownbits and just be 'common' bits (although often knownbits only works for splatted vectors).


https://reviews.llvm.org/D32582





More information about the llvm-commits mailing list