• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=bpfel | FileCheck %s
2
3define i32 @test0(i32 %X) {
4  %tmp.1 = add i32 %X, 1
5  ret i32 %tmp.1
6; CHECK-LABEL: test0:
7; CHECK: r0 += 1
8}
9
10; CHECK-LABEL: store_imm:
11; CHECK: *(u32 *)(r1 + 0) = r{{[03]}}
12; CHECK: *(u32 *)(r2 + 4) = r{{[03]}}
13define i32 @store_imm(i32* %a, i32* %b) {
14entry:
15  store i32 0, i32* %a, align 4
16  %0 = getelementptr inbounds i32, i32* %b, i32 1
17  store i32 0, i32* %0, align 4
18  ret i32 0
19}
20
21@G = external global i8
22define zeroext i8 @loadG() {
23  %tmp = load i8, i8* @G
24  ret i8 %tmp
25; CHECK-LABEL: loadG:
26; CHECK: r1 =
27; CHECK: r0 = *(u8 *)(r1 + 0)
28}
29