<br>
I meet same question with you, and I finnally choose using instrinsic to tag the instruction <br>
<br>
<blockquote name="replyContent" class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0;">
        -----Original Messages-----<br>
<b>From:</b><span id="rc_from">"Son Tuan VU via llvm-dev" <llvm-dev@lists.llvm.org></span><br>
<b>Sent Time:</b><span id="rc_senttime">2020-07-22 20:31:18 (Wednesday)</span><br>
<b>To:</b> llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Cc:</b> <br>
<b>Subject:</b> [llvm-dev] Metadata in LLVM back-end<br>
<br>
        <div dir="auto">
                Hi all,
                <div dir="auto">
                        <br>
                </div>
                <div dir="auto">
                        Currently metadata (other than debug info) can be attached to IR instructions but disappears during DAG selection.
                </div>
                <div dir="auto">
                        <br>
                </div>
                <div dir="auto">
                        My question is why we do not keep the metadata during code lowering and then attach to MachineInstr, just as for IR instructions? Is there any technical challenge, or is it only because nobody wants to do so?
                </div>
                <div dir="auto">
                        <br>
                </div>
                <div dir="auto">
                        Thanks for your help,
                </div>
                <div dir="auto">
                        <br>
                </div>
                <div dir="auto">
                        Best,
                </div>
        </div>
</blockquote>