File tree Expand file tree Collapse file tree 3 files changed +33
-40
lines changed Expand file tree Collapse file tree 3 files changed +33
-40
lines changed Original file line number Diff line number Diff line change @@ -3464,13 +3464,22 @@ def WasmSystemLibrary
34643464 emscripten_return_address,
34653465 __stack_chk_fail, __stack_chk_guard)>;
34663466
3467+ //===----------------------------------------------------------------------===//
3468+ // BPF Runtime Libcalls
3469+ //===----------------------------------------------------------------------===//
3470+
3471+ def isBPF : RuntimeLibcallPredicate<"TT.isBPF()">;
3472+
3473+ // No calls.
3474+ def BPFSystemLibrary : SystemRuntimeLibrary<isBPF, (add)>;
3475+
34673476//===----------------------------------------------------------------------===//
34683477// Legacy Default Runtime Libcalls
34693478//===----------------------------------------------------------------------===//
34703479
34713480// TODO: Should make every target explicit.
34723481def isDefaultLibcallArch : RuntimeLibcallPredicate<[{
3473- TT.isMIPS() || TT.isLoongArch() || TT.isVE() || TT.isBPF() ||
3482+ TT.isMIPS() || TT.isLoongArch() || TT.isVE() ||
34743483 TT.getArch() == Triple::csky || TT.getArch() == Triple::arc ||
34753484 TT.getArch() == Triple::m68k || TT.getArch() == Triple::xtensa ||
34763485 (TT.isSystemZ() && !TT.isOSzOS())
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ; RUN: llc -march=bpfel < %s | FileCheck %s
2+ ;
3+ ; C code for this test case:
4+ ;
5+ ; long func(long a, long b) {
6+ ; long x;
7+ ; return __builtin_mul_overflow(a, b, &x);
8+ ; }
9+
10+
11+ declare { i64 , i1 } @llvm.smul.with.overflow.i64 (i64 , i64 )
12+
13+ define noundef range(i64 0 , 2 ) i64 @func (i64 noundef %a , i64 noundef %b ) local_unnamed_addr {
14+ entry:
15+ %0 = tail call { i64 , i1 } @llvm.smul.with.overflow.i64 (i64 %a , i64 %b )
16+ %1 = extractvalue { i64 , i1 } %0 , 1
17+ %conv = zext i1 %1 to i64
18+ ret i64 %conv
19+ }
20+
21+ ; CHECK-LABEL: func
22+ ; CHECK-NOT: call __multi3
23+ ; CHECK: exit
You can’t perform that action at this time.
0 commit comments