[llvm] c4ac1d2 - [BPF][GlobalISel] select non-PreISelGenericOpcode (#75034)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 00:19:39 PST 2023
Author: Yingchi Long
Date: 2023-12-12T16:19:34+08:00
New Revision: c4ac1d239fbc13c66d3eabdc24783ebb407c35e4
URL: https://github.com/llvm/llvm-project/commit/c4ac1d239fbc13c66d3eabdc24783ebb407c35e4
DIFF: https://github.com/llvm/llvm-project/commit/c4ac1d239fbc13c66d3eabdc24783ebb407c35e4.diff
LOG: [BPF][GlobalISel] select non-PreISelGenericOpcode (#75034)
This selects non-PreISelGenericOpcode as-is.
Depends on: #74999
Co-authored-by: Origami404 <Origami404 at foxmail.com>
Added:
Modified:
llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp
llvm/test/CodeGen/BPF/GlobalISel/ir-translator-ret.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp b/llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp
index 1effeb7a57b13b..c7db93a260c473 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 7a014f7841fc87..031e82dcb67bde 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
}
More information about the llvm-commits
mailing list