[llvm] [DecoderEmitter] Eliminate `DecodeComplete` parameter to `decodeToMCInst` (PR #159130)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 11:28:06 PDT 2025


jurahul wrote:

> > Currently, the code generated by decoder emitter always set `DeocdeComplete` to false when returning Fail from `decodeToMCInst`.
> 
> As I noted in the other PR, this is not exactly true. It only sets it to false when `TryDecode` fails. If `Decode` fails, it does not change the value of `DecodeComplete` and it remains `true` (initialized at the beginning of `decodeToMCInst`).
> 
> We should be careful here not to break downstream targets without providing a working replacement.

Note, when there is any incomplete decode, we always generate TryDecode and never generate a Decode. So when hasIncompleteDecoder = true, its always TryDecode and there is no need to consider Decode AFAICT.

https://github.com/llvm/llvm-project/pull/159130


More information about the llvm-commits mailing list