Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

llvm-diff fails with "structural differences second time around?" on simple testcase #38010

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR39037
Status NEW
Importance P normal
Reported by Matt Arsenault (Matthew.Arsenault@amd.com)
Reported on 2018-09-21 05:43:33 -0700
Last modified on 2018-09-21 11:07:52 -0700
Version trunk
Hardware PC All
CC llvm-bugs@lists.llvm.org, rjmccall@apple.com
Fixed by commit(s)
Attachments 0001-Add-failing-testcase-for-llvm-diff.patch (1709 bytes, application/mbox)
Blocks
Blocked by
See also
Created attachment 20904
Patch with reduced testcase

Reordering the instructions or commuting the operands manages to hide this.

I don't really understand what the assert is complaining about. If I remove it,
it seems to report the correct diff. So far I haven't been able to figure out
exactly what the "first time" would mean here.
Quuxplusone commented 5 years ago

Attached 0001-Add-failing-testcase-for-llvm-diff.patch (1709 bytes, application/mbox): Patch with reduced testcase

Quuxplusone commented 5 years ago

IIRC, llvm-diff's algorithm makes two passes over the code and only reports differences in the second pass, so it doesn't expect to see differences in the second pass that it didn't see in the first.