Hello,
I’m using the ‘llvm-diff’ tool to diff two llvm assembly files. While doing that, I’ve observed that the ‘llvm-diff’ tool shows lots of diffs even when the same assembly files are given as command line arguments. For example, if we run
$ llvm-diff test.ll test.ll
‘llvm-diff’ shows lots of diffs for “static” global variables. This is an example.
// in test.c
static struct vmcs_layout vmcs_layout;
output for ‘llvm-diff’ is as follows.
%3 = load i32, i32* getelementptr inbounds (%struct.vmcs_layout.663, %struct.vmcs_layout.663* @vmcs_layout, i64 0, i32 0), align 4
< %3 = load i32, i32* getelementptr inbounds (%struct.vmcs_layout, %struct.vmcs_layout* @vmcs_layout, i64 0, i32 0), align 4
The difference is a suffix, 663. Is this behavior intentional for ‘llvm-diff’? If it’s intentional, how can I update ‘llvm-diff’ tool to see “no” diffs for the same .ll file?
Thank you,
Yonghyun