[llvm] [TableGen][Decoder] Decode operands with zero width or all bits known (PR #156358)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 13:55:51 PDT 2025
s-barannikov wrote:
Hi, @DragonDisciple
I had a few iterations on this and in the final iteration I forgot about the case of "all zeros init value" and didn't bother to add tests because I hoped that in-tree targets cover all cases. It appears I was wrong.
> So which would you surmise is the issue?:
>
> * OpInfo.Fields should not be empty for 'op'
> * There should be a check for OpInfo.Fields being empty but having InitValue.has_value() to ensure tmp is initialized
The second.
> Edit/Update:
> The quick fix I came up with. Seems reasonable to ensure the initial value is respected:
The fix looks correct to me, I'll prepare a PR, thanks!
https://github.com/llvm/llvm-project/pull/156358
More information about the llvm-commits
mailing list