[llvm] [AMDGPU] Relax SOPK immediate signed/unsigned check (PR #77015)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 21:00:00 PST 2024


arsenm wrote:

> > The MIR verifier has no bearing on the assembler support. This check is for our own sanity, so we should just be better about marking instructions with sopkIsZext
> 
> The problem with the check is that it triggers on user code, not something we are creating inside the compiler. A user code just calls setreg intrinsic and fall into the problem. What is worse it only happens with debug build. I could change the operand to be unsigned, although it is not what is written in SP3, but it will break sources which are now using negative constants to w/a this problem.

You can use an SDNodeXForm on the immediate to fix it up during selection 

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


More information about the llvm-commits mailing list