<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/112818>112818</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            The branch instruction is compiled into other instructions after linking
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          muxiff
      </td>
    </tr>
</table>

<pre>
    Hi,
I have customized two branch instructions using the following class,
```
let DecoderNamespace = "Namspace" in {
  class BranchClassName<bit F, bits<3> funct3, string opcodestr>
    : RVInst<(outs), (ins GPR:$rs1, GPR:$rs2, simm12_lsb0:$imm11), 
              opcodestr, "$rs1, $rs2, $imm11", [], InstFormatB> {
    bits<5> rs1;
    bits<5> rs2;
    bits<11> imm11;

    let Inst{31} = F;
    let Inst{30-25} = imm11{9-4};
    let Inst{24-20} = rs2;
    let Inst{19-15} = rs1;
    let Inst{14-12} = funct3;
    let Inst{11-8} = imm11{3-0};
    let Inst{7} = imm11{10};
    let Inst{6-0} = OPC_CUSTOM_3.Value;

    let isBranch = 1;
    let isTerminator = 1;
  }
}
```
When I use them simultaneously in the same assembly file, the encoding and decoding I see when performing assembly and disassembly operations are one-to-one correspondence.
 However, when I compile this assembly file into a complete elf and then use disassembly tools to view it, I found that one of these two branch instructions has been compiled into the other. 
Can someone tell me why this is happening, or is there any other restriction that needs to be added to the class definition?

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VcFy4zYM_Rr6gpFHJOXYOugQ23E3h-7ubNPtMUNJkMWWIj0kFTf9-g4oO46z681kJgLx8PAAEogKQe8tYsUWa7bYztQYe-erYfxXd92sdu1r9UkzsWH5luX3j9CrF4RmDNEN-j9sIR4d1F7ZpgdtQ_RjE7WzAcag7R5ij9A5Y9yRrMaoEN642F1--k2mwQhbbFyL_rMaMBxUg8DkFpgQn9WQbCYEaAtsuZ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