<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Francesco,<div class=""><br class=""></div><div class="">Yes, the subreg are transitive but the transitivity may not be represented the way you expect.</div><div class=""><br class=""></div><div class="">Essentially all the registers map to a set of register units. Two registers overlap if their register units overlap.</div><div class="">The register units are not necessarily actual register.</div><div class=""><br class=""></div><div class="">E.g., in your first example, ABCD maps to the reg unit A, B, C, and D.</div><div class="">In your second example, ADE maps to A and AD maps to A as well. Assuming D and E are not physically accessible by themselves.</div><div class=""><br class=""></div><div class="">You can take query the regunits using the related MCRegisterInfo API, e.g., <span style="font-family: Menlo; font-size: 11px;" class="">MCRegUnitIterator</span>.</div><div class=""><br class=""></div><div class="">Hope this helps.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">-Quentin</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Sep 17, 2021, at 11:19 AM, Francesco Bertolaccini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Is the relation between registers and their subregisters transitive?<br class="">That is, supposing I have registers<br class=""><br class="">  ABCD<br class="">  ABC<br class="">  AB<br class="">  A<br class=""><br class="">such that ABCD has subregister ABC, ABC has subregister AB and AB has<br class="">subregister A. Does LLVM recognize that A is also a subregister of ABCD?<br class=""><br class="">Also, suppose now that my registers are<br class=""><br class="">  ABC<br class="">  ADE<br class="">  AB<br class="">  AD<br class="">  A<br class=""><br class="">with a relationship similar to the one described above, such that ABC<br class="">and ADE are not in any kind of register-subregister relationship but<br class="">still partially overlap. Is LLVM able to recognize this, and treat the<br class="">situation accordingly (when spilling, etc)?<br class=""><br class="">Thanks,<br class="">Francesco<br class="">_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></div></blockquote></div><br class=""></div></body></html>