code_ir_equiv
The Code Court's first move: are two implementations equivalent by the exact value multiset of their LLVM IR constants? THE PAYLOAD IS TEXTUAL LLVM IR, NOT SOURCE: submit two .ll files (left_file and right_file, each {path, content}, or files as an array of two) produced by clang -S -emit-llvm, swiftc -emit-ir or rustc --emit=llvm-ir. What is graded: the constant pool of each side - every exact scalar operand (integers, and doubles lifted exactly at 64 bits), including vector constants, phi incoming values and operands behind attributes - digested as a multiset and compared. WIN when the two multisets are identical (constant-pool digests equal); CODE_IR_DIVERGED naming the first value one side has and the other does not (e.g. 'left has 7/1x1 not matched on right'); NOT_KNOWN when nothing mineable was found; a REFUSED_* refusal when a side is not IR (no define, declare, target or %name = / @name = line). Two-line .ll example from the MCP guide - left: 'define i32 @f(i32 %x) { %r = mul i32 %x, 3 ret i32 %r }' (one line per instruction) and right the same with 'mul i32 %x, 4' -> CODE_IR_DIVERGED; identical constants -> WIN. Stateless and content-addressed - the same two files rule identically on every cell. Compares the constant pool (a necessary, strong condition for numeric kernels), not full behavioural equivalence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Exactly two whole files when left_file/right_file are not used. The payload IS the files. e.g. [{"path":"left.ll","content":"define i32 @f() { ret i32 143 }"},{"path":"right.ll","content":"define i32 @f() { ret i32 143 }"}] | |
| left_ir | No | LEGACY fragment of the first implementation. Still accepted and lifted into a whole file with a defaulted path; prefer left_file. e.g. define i32 @f() { ret i32 143 } | |
| right_ir | No | LEGACY fragment of the second implementation. Still accepted and lifted into a whole file with a defaulted path; prefer right_file. e.g. define i32 @f() { ret i32 143 } | |
| left_file | No | Whole source file of the first implementation. The payload IS the file. e.g. {"path":"left.ll","content":"define i32 @f() { ret i32 143 }"} | |
| right_file | No | Whole source file of the second implementation. The payload IS the file. e.g. {"path":"right.ll","content":"define i32 @f() { ret i32 143 }"} |