LLVM IR

1 program Added 2026-02-08T14:43:01Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: LLVM, LLVM Intermediate Representation
Provenance: commit 7ff785b562 · authored 2026-02-08T15:44:00+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/llvmir
LLM (this repo) · 1Pldb

Related languages

PIR (0.59)Parrot (0.57)MLIR (0.53)SPIR-V (0.44)FIRRTL (0.44)

LLM-contributed programs

Factorial Function

Provenance: commit 7ff785b562 · authored 2026-02-08T15:44:00+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.ll · added: 2026-02-08T14:43:01Z
; ModuleID = 'factorial.c'
source_filename = "factorial.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @factorial(i32 %n) #0 {
entry:
  %retval = alloca i32, align 4
  %n.addr = alloca i32, align 4
  store i32 %n, i32* %n.addr, align 4
  %0 = load i32, i32* %n.addr, align 4
  %cmp = icmp sle i32 %0, 1
  br i1 %cmp, label %if.then, label %if.else

if.then:
  store i32 1, i32* %retval, align 4
  br label %return

if.else:
  %1 = load i32, i32* %n.addr, align 4
  %2 = load i32, i32* %n.addr, align 4
  %sub = sub nsw i32 %2, 1
  %call = call i32 @factorial(i32 %sub)
  %mul = mul nsw i32 %1, %call
  store i32 %mul, i32* %retval, align 4
  br label %return

return:
  %3 = load i32, i32* %retval, align 4
  ret i32 %3
}

attributes #0 = { noinline nounwind optnone uwtable }

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about LLVM IR (mapped to pl/llvmir). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/LLVM IR/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← LLVM LMBC →