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/llvmirRelated languages
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.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Factorial Function
Provenance: commit 7ff785b562 · authored 2026-02-08T15:44:00+01:00 · agent claude-code · model sonnet · WebSearch disabled
; 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 }