[PATCH] D104245: [GlobalISel] Describe undefined values for G_SBFX/G_UBFX operands

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 02:05:05 PDT 2021


foad added inline comments.


================
Comment at: llvm/docs/GlobalISel/GenericOpcode.rst:259
+
+      0 <= lsb < lsb + width <= source bitwidth, where all values are unsigned
+
----------------
bcahoon wrote:
> arsenm wrote:
> > What what is the result if this is violated? Poison?
> I think poison makes sense. Though, I'm not sure how that concept occurs in the gMIR?
> I think poison makes sense.

I think it should be the same as what you get from any out-of-range shift. In IR that would be poison. but...

> Though, I'm not sure how that concept occurs in the gMIR?

... I get the impression that codegen does not really distinguish between undef and poison (yet).

Given that the description of shifts in this document does not mention the out of range case at all, I think the current patch is good to go as-is. Obviously it would be great if someone could add documentation about the out-of-range / undef / poison cases in future.


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

https://reviews.llvm.org/D104245



More information about the llvm-commits mailing list