[PATCH] D109883: [Analysis] Add support for vscale in computeKnownBitsFromOperator

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 17 07:23:02 PDT 2021


dmgreen added a comment.

This is a bit of a roundabout way of setting a constant, but that sounds OK to me considering what else this does. (So long as removing the llvm.vscale and replacing it with a constant won't cause problems elsewhere, I assume it shouldn't).

Can you add a quick comment explaining `VScaleRange.first == VScaleRange.second` vs other part of the code? And it might be worth having a test directly for converting vscale to a constant:

  define i64 @const_vscale64_range4_4() vscale_range(4,4) {
  entry:
    %vscale = call i64 @llvm.vscale.i64()
    ret i64 %vscale
  }


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109883/new/

https://reviews.llvm.org/D109883



More information about the llvm-commits mailing list