Actually, I think the issue is not just about comparing locators,
> but rather: why do you need locator equality for
> ASM_INPUT/ASM_OPERANDS to be equivalent? The checking of the other
Because then you regress in debug info quality, we emit the location
with .loc before the asm. Though, for -O0 we hopefully don't perform
crossjumping and similar optimizations, and for -O1+ the code quality is
more important than debug info quality.
If we'd want to ignore it, the right fix wouldn't be your patch,
but just making that operand use 0 format instead of i and adjust
print-rtl.c etc.