<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 14, 2021, at 13:39, Luo, Yuanke <<a href="mailto:yuanke.luo@intel.com" class="">yuanke.luo@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi,<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I discussed with Florian for a solution at<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D99152" style="color: blue; text-decoration: underline;" class="">https://reviews.llvm.org/D99152</a>. Florian suggest introducing a specific intrinsic to replace bitcast in front-end, and backend need extra effort to optimize or eliminate the intrinsic. This idea looks good to me. Here is my plan.<o:p class=""></o:p></div><ol start="1" type="1" style="margin-bottom: 0in; margin-top: 0in;" class=""><li class="MsoListParagraph" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">specify x86_amx in LangRef and verify the IR. Patches were uploaded at<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D100032" style="color: blue; text-decoration: underline;" class="">https://reviews.llvm.org/D100032</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D100472" style="color: blue; text-decoration: underline;" class="">https://reviews.llvm.org/D100472</a>.<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Add llvm.x86.tile.cast intrinsic in LLVM.<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Optimize some of llvm.x86.tile.cast code as bitcast does, and transform llvm.x86.tile.cast to amx intrinsic if it can't be eliminated.<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">After the above 3 items are finished, replace bitcast with llvm.x86.tile.cast in front-end when generate IR for amx builtin.<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">After some time for stabilization, remove bitcast transform code from LLVM.<o:p class=""></o:p></li></ol><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></blockquote><br class=""></div><div><br class=""></div><div>Thanks for the update, I think that’s a good step forward to more effectively hash out the specification for the x86_amx type. I think it clarifies the expected behavior, but it would be great if other people could also take a look.</div><div><br class=""></div><div>Cheers,</div><div>Florian</div></body></html>