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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 15:16:09 PDT 2024


topperc wrote:

> The idea of having these opcodes has been suggested by @arsenm in [#83498 (comment)](https://github.com/llvm/llvm-project/pull/83498#discussion_r1508565901)
> 
> I find it useful as X86, AArch64, RISCV and Mips can avoid manual selection. AMDGPU is an exception as it lowers traps during legalization even using Selection DAG.
> 
> I'm not sure whether it is a good idea or not to edit all targets at once. But I'd like to avoid intermediate stage when both `G_*TRAP` and `G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.*trap)` are allowed.
> 
> I've tried to cleanup all `G_INTRINSIC_W_SIDE_EFFECTS.*trap` usages as well as `llvm.*trap`.

Can you put this in the PR description so it will end up in the patch description so it ends up in the commit message.



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


More information about the llvm-commits mailing list