<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in simplifypatable-nullptr.ll</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>497a5f04 - [BPF] Fix a bug in BPFMISimplifyPatchable pass</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/test/CodeGen/BPF/CORE/simplifypatable-nullptr.ll#497a5f04</link>
        <description>[BPF] Fix a bug in BPFMISimplifyPatchable passLLVM BPF pass SimplifyPatchable is used to do necessarycode conversion for CO-RE operations. When studying bpfselftest &apos;exhandler&apos;, I found a corner case not handled properly.The following is the C code, modified from original &apos;exhandler&apos;code.  int g;  int test(struct t1 *p) {    struct t2 *q = p-&gt;q;    if (q)      return 0;    struct t3 *f = q-&gt;f;    if (!f) g = 5;    return 0;  }For code:  struct t3 *f = q-&gt;f;  if (!f) ...The IR before BPFMISimplifyPatchable pass looks like:  %5:gpr = LD_imm64 @&quot;llvm.t2:0:8$0:1&quot;  %6:gpr = LDD killed %5:gpr, 0  %7:gpr = LDD killed %6:gpr, 0  JNE_ri killed %7:gpr, 0, %bb.3  JMP %bb.2Note that compiler knows q = 0 based dataflow and value analysis.The correct generated code after the pass should be  %5:gpr = LD_imm64 @&quot;llvm.t2:0:8$0:1&quot;  %7:gpr = LDD killed %5:gpr, 0  JNE_ri killed %7:gpr, 0, %bb.3  JMP %bb.2But the current implementation did further optimization for theabove code and generates  %5:gpr = LD_imm64 @&quot;llvm.t2:0:8$0:1&quot;  JNE_ri killed %5:gpr, 0, %bb.3  JMP %bb.2which is incorrect.This patch added a cache to remember those load insns not associatedwith CO-RE offset value and will skip these load insns duringtransformation.Differential Revision: https://reviews.llvm.org/D123883

            List of files:
            /llvm-project-15.0.7/llvm/test/CodeGen/BPF/CORE/simplifypatable-nullptr.ll</description>
        <pubDate>Mon, 04 Apr 2022 18:39:51 +0000</pubDate>
        <dc:creator>Peter Klausler &lt;pklausler@nvidia.com&gt;</dc:creator>
    </item>
</channel>
</rss>
