Skip to content

Commit c4ac1d2

Browse files
inclycOrigami404
andauthored
[BPF][GlobalISel] select non-PreISelGenericOpcode (#75034)
This selects non-PreISelGenericOpcode as-is. Depends on: #74999 Co-authored-by: Origami404 <[email protected]>
1 parent b0cc42a commit c4ac1d2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

llvm/lib/Target/BPF/GISel/BPFInstructionSelector.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ BPFInstructionSelector::BPFInstructionSelector(const BPFTargetMachine &TM,
7676
}
7777

7878
bool BPFInstructionSelector::select(MachineInstr &I) {
79+
if (!isPreISelGenericOpcode(I.getOpcode()))
80+
return true;
7981
if (selectImpl(I, *CoverageInfo))
8082
return true;
8183
return false;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
; RUN: llc -mtriple=bpfel -global-isel -verify-machineinstrs -stop-after=irtranslator < %s | FileCheck %s
2+
; RUN: llc -mtriple=bpfel -global-isel -verify-machineinstrs < %s | FileCheck --check-prefix=ISEL %s
23

34
; CHECK: name: f
45
; CHECK: RET
56
define void @f() {
7+
; ISEL-LABEL: f:
8+
; ISEL: # %bb.0:
9+
; ISEL-NEXT: exit
10+
; ISEL-NEXT: .Lfunc_end0:
611
ret void
712
}

0 commit comments

Comments
 (0)