[llvm] [AMDGPU] Handled G_UBSANTRAP GlobalIsel (PR #134492)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 23:51:07 PDT 2025


================
@@ -2103,7 +2103,7 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
   getActionDefinitionsBuilder({G_MEMCPY, G_MEMCPY_INLINE, G_MEMMOVE, G_MEMSET})
       .lower();
 
-  getActionDefinitionsBuilder({G_TRAP, G_DEBUGTRAP}).custom();
+  getActionDefinitionsBuilder({G_TRAP, G_DEBUGTRAP, G_UBSANTRAP}).custom();
----------------
arsenm wrote:

We probably should add the default lower() action to LegalizerHelper for G_DEBUGTRAP and G_UBSANTRAP, which just replace the opcode with G_TRAP (this is what LegalizeDAG does as the default action)

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


More information about the llvm-commits mailing list