Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/om/codegen/regalloc_ir.om # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / om / codegen / regalloc_ir.om` 56 lines · 662 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Pure scalar decisions shared by hosted and allocation-free IR shells. 3 fn ra_ir kind ulong a long b long to long 4 if eq kind 0 5 if ge a b 6 ret -1 7 end 8 ret a 9 end 10 if eq kind 1 11 if lt a 0 12 ret b 13 end 14 ret a 15 end 16 if eq kind 2 17 if gt b a 18 ret b 19 end 20 ret a 21 end 22 if eq kind 3 23 if and ge a 0 lt a b 24 ret 1 25 end 26 ret 0 27 end 28 if eq kind 4 29 if or eq a 6 eq a 7 30 ret 1 31 end 32 ret 0 33 end 34 if eq kind 5 35 if lt a 1024 36 ret 1 37 end 38 ret 0 39 end 40 if eq kind 6 41 ret long mul div add uint a 9 8 8 42 end 43 if eq kind 7 44 if and eq rem uint a 8 0 ge uint a add uint b 2 45 ret 1 46 end 47 ret 0 48 end 49 if eq kind 8 50 if and gt a 128 le a 246 51 ret 1 52 end 53 ret 0 54 end 55 ret -1 56 end