Attached is a .ll with a reproducible test case for the bug addressed by r100044 -- "Fix a nasty dangling-pointer heisenbug that could generate wrong code pretty much anywhere AFAICT."
Doing
llvm-as < sunkaddr.ll | llc
which a llc after r100044 will generate
.LBB1_2: # %if-false-block
movl $1, 16(%rdi)
movl 120(%rdi), %eax
ret
while one before will generate:
.LBB1_2: # %if-false-block
movl $1, 16(%rdi)
movl $1, %eax
ret
There are some FileCheck directives to verify this.
There is also a main function which will print (and return an exit code)
of 0 on success, and 1 on failure.
Jose
sunkaddr.ll (1.36 KB)