interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / om / codegen / regalloc_ir.om

56 lines · 662 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Pure scalar decisions shared by hosted and allocation-free IR shells.
3fn ra_ir kind ulong a long b long to long
4if eq kind 0
5if ge a b
6ret -1
7end
8ret a
9end
10if eq kind 1
11if lt a 0
12ret b
13end
14ret a
15end
16if eq kind 2
17if gt b a
18ret b
19end
20ret a
21end
22if eq kind 3
23if and ge a 0 lt a b
24ret 1
25end
26ret 0
27end
28if eq kind 4
29if or eq a 6 eq a 7
30ret 1
31end
32ret 0
33end
34if eq kind 5
35if lt a 1024
36ret 1
37end
38ret 0
39end
40if eq kind 6
41ret long mul div add uint a 9 8 8
42end
43if eq kind 7
44if and eq rem uint a 8 0 ge uint a add uint b 2
45ret 1
46end
47ret 0
48end
49if eq kind 8
50if and gt a 128 le a 246
51ret 1
52end
53ret 0
54end
55ret -1
56end