[llvm] [RISCV] Use `experimental-p` extension for zero-extended narrow unsigned types (PR #213260)

Rajveer Singh Bharadwaj via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 04:38:40 PDT 2026


Rajveer100 wrote:

> The original bug report says
> 
> 
> 
> > The example I gave is a minimal one. More commonly I see this in arithmetic done on lbu loads from uint8_t struct fields (so the known-zero comes from the load instruction, not from ABI guarantees).
> 
> 
> 
> This patch only handles the argument or basic block livein case but doesn't handle loads. Is this patch extendable to loads in the future? I'm not sure if the load will be a zero extending load or an any extending load when it reaches this code.

This shouldn't be difficult to add in upcoming follow-ups, regardless of it being zero/any extending loads, we just need an extra match for it.

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


More information about the llvm-commits mailing list