<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 28, 2016, at 13:34, Justin Bogner <<a href="mailto:mail@justinbogner.com" class="">mail@justinbogner.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Matt Arsenault <</span><a href="mailto:arsenm2@gmail.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">arsenm2@gmail.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> writes:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class="">On Oct 27, 2016, at 15:39, Justin Bogner <<a href="mailto:mail@justinbogner.com" class="">mail@justinbogner.com</a>> wrote:<br class=""><br class="">Quentin Colombet via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> writes:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Sep 30, 2016, at 12:07 PM, Krzysztof Parzyszek via llvm-commits<br class=""><<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""><br class="">On 9/30/2016 1:46 PM, Justin Bogner via llvm-commits wrote:<br class=""><blockquote type="cite" class="">The assert I'm seeing is in the case where `OpRC != nullptr` but<br class="">`ConstrainedRC == nullptr`. Quentin's suggestion would call<br class="">getAllocatableClass(DstRC) in this case, whereas in the committed code<br class="">we just go ahead and do MRI->createVirtualRegister(OpRC). The call to<br class="">createVirtualRegister asserts because OpRC isn't allocatable.<br class=""></blockquote><br class="">This doesn't sound right. This implies that a register was created<br class="">for the operand that is not compatible with the operand's<br class="">class. Sounds like the problem is somewhere else.<br class=""></blockquote><br class="">That’s exactly what this code is supposed to fix IIRC. Thus, the<br class="">current patch does not sound right :).<br class=""></blockquote><br class="">Ping. Matt, have you had a chance to look at this?<br class=""></blockquote><br class="">The problem is I want to use the output from constrainRegClass as the<br class="">virtual register class instead of getAllocatableClass. Instead of the<br class="">assert in the case where constrainRegClass fails, would it work to try<br class="">using getAllocatableClass instead? i.e. getAllocatableClass is the<br class="">fallback if constrainRegClass fails and then the same create vreg and<br class="">copy<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Do you mean something like this?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span id="cid:3D808F4A-4BE5-40EA-9D13-F73546C35A9B@amd.com"><addregop.patch></span></div></blockquote></div><br class=""><div class="">Yes, that works for me. That avoids the original problem of calling it right away on the register class in the instruction definition</div><div class=""><br class=""></div><div class="">-Matt</div></body></html>