Skip to content

Revert "[AMDGPU] Add verification for amdgcn.init.exec.from.input" #128433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ro-i
Copy link
Contributor

@ro-i ro-i commented Feb 23, 2025

Reverts #128172

@llvmbot
Copy link
Member

llvmbot commented Feb 23, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Robert Imschweiler (ro-i)

Changes

Reverts llvm/llvm-project#128172


Full diff: https://github.com/llvm/llvm-project/pull/128433.diff

2 Files Affected:

  • (modified) llvm/lib/IR/Verifier.cpp (-8)
  • (removed) llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll (-25)
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 310a6735d55d6..58fd575e6e7e8 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -6371,14 +6371,6 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
           "llvm.amdgcn.cs.chain must be followed by unreachable", &Call);
     break;
   }
-  case Intrinsic::amdgcn_init_exec_from_input: {
-    const Argument *Arg = dyn_cast<Argument>(Call.getOperand(0));
-    Check(Arg && Arg->hasInRegAttr(),
-          "only inreg arguments to the parent function are valid as inputs to "
-          "this intrinsic",
-          &Call);
-    break;
-  }
   case Intrinsic::amdgcn_set_inactive_chain_arg: {
     auto CallerCC = Call.getCaller()->getCallingConv();
     switch (CallerCC) {
diff --git a/llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll b/llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll
deleted file mode 100644
index 11426041924e4..0000000000000
--- a/llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: not llvm-as -disable-output 2>&1 %s | FileCheck %s
-
-declare void @llvm.amdgcn.init.exec.from.input(i32, i32 immarg)
-
-; CHECK: only inreg arguments to the parent function are valid as inputs to this intrinsic
-; CHECK-NEXT: call void @llvm.amdgcn.init.exec.from.input(i32 0, i32 0)
-define void @init_exec_from_input_fail_constant() {
-  call void @llvm.amdgcn.init.exec.from.input(i32 0, i32 0)
-  ret void
-}
-
-; CHECK: only inreg arguments to the parent function are valid as inputs to this intrinsic
-; CHECK-NEXT: call void @llvm.amdgcn.init.exec.from.input(i32 %b, i32 0)
-define void @init_exec_from_input_fail_not_inreg(i32 inreg %a, i32 %b) {
-  call void @llvm.amdgcn.init.exec.from.input(i32 %b, i32 0)
-  ret void
-}
-
-; CHECK: only inreg arguments to the parent function are valid as inputs to this intrinsic
-; CHECK-NEXT: call void @llvm.amdgcn.init.exec.from.input(i32 %c, i32 0)
-define void @init_exec_from_input_fail_instruction(i32 inreg %a, i32 %b) {
-  %c = add i32 %a, %b
-  call void @llvm.amdgcn.init.exec.from.input(i32 %c, i32 0)
-  ret void
-}

@llvmbot
Copy link
Member

llvmbot commented Feb 23, 2025

@llvm/pr-subscribers-llvm-ir

Author: Robert Imschweiler (ro-i)

Changes

Reverts llvm/llvm-project#128172


Full diff: https://github.com/llvm/llvm-project/pull/128433.diff

2 Files Affected:

  • (modified) llvm/lib/IR/Verifier.cpp (-8)
  • (removed) llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll (-25)
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 310a6735d55d6..58fd575e6e7e8 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -6371,14 +6371,6 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
           "llvm.amdgcn.cs.chain must be followed by unreachable", &Call);
     break;
   }
-  case Intrinsic::amdgcn_init_exec_from_input: {
-    const Argument *Arg = dyn_cast<Argument>(Call.getOperand(0));
-    Check(Arg && Arg->hasInRegAttr(),
-          "only inreg arguments to the parent function are valid as inputs to "
-          "this intrinsic",
-          &Call);
-    break;
-  }
   case Intrinsic::amdgcn_set_inactive_chain_arg: {
     auto CallerCC = Call.getCaller()->getCallingConv();
     switch (CallerCC) {
diff --git a/llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll b/llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll
deleted file mode 100644
index 11426041924e4..0000000000000
--- a/llvm/test/Verifier/AMDGPU/intrinsic-amdgpu-init-exec-from-input.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: not llvm-as -disable-output 2>&1 %s | FileCheck %s
-
-declare void @llvm.amdgcn.init.exec.from.input(i32, i32 immarg)
-
-; CHECK: only inreg arguments to the parent function are valid as inputs to this intrinsic
-; CHECK-NEXT: call void @llvm.amdgcn.init.exec.from.input(i32 0, i32 0)
-define void @init_exec_from_input_fail_constant() {
-  call void @llvm.amdgcn.init.exec.from.input(i32 0, i32 0)
-  ret void
-}
-
-; CHECK: only inreg arguments to the parent function are valid as inputs to this intrinsic
-; CHECK-NEXT: call void @llvm.amdgcn.init.exec.from.input(i32 %b, i32 0)
-define void @init_exec_from_input_fail_not_inreg(i32 inreg %a, i32 %b) {
-  call void @llvm.amdgcn.init.exec.from.input(i32 %b, i32 0)
-  ret void
-}
-
-; CHECK: only inreg arguments to the parent function are valid as inputs to this intrinsic
-; CHECK-NEXT: call void @llvm.amdgcn.init.exec.from.input(i32 %c, i32 0)
-define void @init_exec_from_input_fail_instruction(i32 inreg %a, i32 %b) {
-  %c = add i32 %a, %b
-  call void @llvm.amdgcn.init.exec.from.input(i32 %c, i32 0)
-  ret void
-}

Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@ro-i ro-i closed this Feb 23, 2025
@ro-i ro-i deleted the revert-128172-verify-amdgpu-init-exec branch February 23, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants