[llvm] [GlobalISel] Introduce G_TRAP, G_DEBUGTRAP, G_UBSANTRAP (PR #84941)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 00:34:46 PDT 2024


arsenm wrote:

> > Can you put this in the PR description so it will end up in the commit message.
> 
> @topperc I've rephrased in more general terms.
> 
> I've noticed that there are checks for GMIR opcodes in MachineVerifier. Should I add sanity checks that `G_TRAP` and `G_DEBUGTRAP` have no args and `G_UBSANTRAP` has only an `i8` immediate argument?

You should add the tests. I believe the operand number checks should work by default, but you might need code to verify the immediate operand 

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


More information about the llvm-commits mailing list