<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95516>95516</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[RISCV] getInstSizeInBytes estimate the size of compressed instruction incorrectly
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zixuan-wu
</td>
</tr>
</table>
<pre>
```
if (MI.getParent() && MI.getParent()->getParent()) {
if (isCompressibleInst(MI, STI))
return 2;
}
```
Because the compressed instruction can be relaxed in assembler later, so is this right to estimate the size of compressed instruction?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUkuL2zAQ_jXjy5CgjCwnOfiw2TSQQ6F0S--yPbFVZHvRjPeRX19ip7T0cSgICfTpe2hmvEhoB-YS3AHcMfOTdmMqr-Ft8sPqdcqqsXkvoTD3ZY5gHpY9XBBo9_G8blk_-cSDAu2A9ghUABX4J7IC--G3q_n99rAoIiIuqkEex_45sUioIp8H0dkK6BGfvpwX3p2TWKc0IIH9oQLb4685_xr-wLWfhFE7xvpuxQ2GQTRNtYZxwNoPWDEmjv5thtCLcF9FThi9crqlkRGDoHZBMIW2U9QRWTT0XhdxCVfG8fIPE7CnrClts7d7n3G52W521lmXU9aVube-2eb5blcbdk1tqq0tnDHkGke-sVkoyVBuik1uduRyWtttk5OjfcGXorrYPeSGex_iOsaXfj2mNgsiE5d75zZFFn3FUebGEw38ijMIRLc5SOWNs6qmViA3MYjKTxUNGueJ-Xx-evwK7ogt661JT-HK5-Hwriz_UwUMQz2mxLXG92xKsexUnwXsA9AJ6NQG7aZqXY890OkW4n6sntP4jWsFOs3RBei0fO2lpO8BAAD__7aB45M">