[llvm] [AMDGPU] Guard more intrinsics with target features (PR #203956)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 06:52:18 PDT 2026
================
@@ -2,12 +2,12 @@
; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx705 -filetype=null < %s 2>&1 | FileCheck -check-prefix=ERR %s
; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx810 -filetype=null < %s 2>&1 | FileCheck -check-prefix=ERR %s
-; RUN: not llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx602 -filetype=null < %s 2>&1 | FileCheck -check-prefix=ERR %s
-; RUN: not llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx705 -filetype=null < %s 2>&1 | FileCheck -check-prefix=ERR %s
-; RUN: not llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx810 -filetype=null < %s 2>&1 | FileCheck -check-prefix=ERR %s
+; RUN: not llc -global-isel=1 -global-isel-abort=0 -mtriple=amdgcn -mcpu=gfx602 -filetype=null < %s 2>&1 | FileCheck -check-prefix=ERR %s
----------------
shiltian wrote:
That said, there are two options: use `not --crash` or `-global-isel-abort=0`.
You mentioned that using `not --crash` is a regression. That's because a failure in the instruction selector and legalizer is not treated as an abort by default in GISel. However, we're now doing the feature check in the IR translator, and returning false from the IR translator causes the translation to abort by default.
Are you suggesting that we should move the feature check to a point after the IR translator instead? I think it makes sense to perform the check in the IR translator. If an intrinsic isn't supported, it doesn't make much sense to translate it into MIR in the first place.
https://github.com/llvm/llvm-project/pull/203956
More information about the llvm-commits
mailing list