[llvm-branch-commits] [llvm] [BPF][GlobalISel] select non-PreISelGenericOpcode (PR #75034)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 11 01:39:48 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-globalisel
Author: Yingchi Long (inclyc)
<details>
<summary>Changes</summary>
This selects non-PreISelGenericOpcode as-is.
---
Full diff: https://github.com/llvm/llvm-project/pull/75034.diff
2 Files Affected:
- (modified) llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp (+2)
- (modified) llvm/test/CodeGen/BPF/GlobalISel/ir-translator-ret.ll (+5)
``````````diff
diff --git a/llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp b/llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp
index 1effeb7a57b13..c7db93a260c47 100644
--- a/llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp
+++ b/llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp
@@ -76,6 +76,8 @@ BPFInstructionSelector::BPFInstructionSelector(const BPFTargetMachine &TM,
}
bool BPFInstructionSelector::select(MachineInstr &I) {
+ if (!isPreISelGenericOpcode(I.getOpcode()))
+ return true;
if (selectImpl(I, *CoverageInfo))
return true;
return false;
diff --git a/llvm/test/CodeGen/BPF/GlobalISel/ir-translator-ret.ll b/llvm/test/CodeGen/BPF/GlobalISel/ir-translator-ret.ll
index 7a014f7841fc8..031e82dcb67bd 100644
--- a/llvm/test/CodeGen/BPF/GlobalISel/ir-translator-ret.ll
+++ b/llvm/test/CodeGen/BPF/GlobalISel/ir-translator-ret.ll
@@ -1,7 +1,12 @@
; RUN: llc -mtriple=bpfel -global-isel -verify-machineinstrs -stop-after=irtranslator < %s | FileCheck %s
+; RUN: llc -mtriple=bpfel -global-isel -verify-machineinstrs < %s | FileCheck --check-prefix=ISEL %s
; CHECK: name: f
; CHECK: RET
define void @f() {
+; ISEL-LABEL: f:
+; ISEL: # %bb.0:
+; ISEL-NEXT: exit
+; ISEL-NEXT: .Lfunc_end0:
ret void
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/75034
More information about the llvm-branch-commits
mailing list