According to DWARF standard, is_stmt is a global flag; when set or cleared it should affect subsequent .loc directives.
However llvm assembler handled is_stmt differently: it forced all locations to have is_stmt=1 unless is_stmt was specified explicitly as 0.
The proposed fix utilizes current DWARF state flags to compute correct is_stmt values.
See bug 45529 for a detailed issue description.
I would expect this needs to be in an x86 subdirectory or something, but it looks like none of the other tests here bother to check if x86 is built?