This attempts to compare the first-order output of the cost model compared to the measured codesize. It generates simple snippets of IR and compares the output of opt -passes=print -cost-kind=codesize and the assembly generated from llc. The assembly output of llc is sometimes filtered to remove loop invariant instructions.
The table lists the difference between the two cost models (i.e. zero is good). Not all the scores are expected to match exactly. More details and the costs can be found by clicking on a table entry.