[llvm-bugs] [Bug 10003] SelectionDAG instruction selection performs CSE on nodes with debug information

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 1 18:30:42 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=10003

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |rnk at google.com
         Resolution|WONTFIX                     |---

--- Comment #10 from Reid Kleckner <rnk at google.com> ---
Similar issue, consider the following code and the .loc directives in the
assembly:

volatile int x;
extern "C" void exit(int);
int main() {
  x += 24;
  x += 2;
  x += 3;
  x += 4;
  exit(24);
}

        addl    $24, "?x@@3HC"(%rip)
        .loc    1 5 5                   # t.cpp:5:5
        addl    $2, "?x@@3HC"(%rip)
        .loc    1 6 5                   # t.cpp:6:5
        addl    $3, "?x@@3HC"(%rip)
        .loc    1 7 5                   # t.cpp:7:5
        addl    $4, "?x@@3HC"(%rip)
        .loc    1 4 5                   # t.cpp:4:5
        movl    $24, %ecx
        .loc    1 8 3                   # t.cpp:8:3
        callq   exit
        .loc    1 9 1                   # t.cpp:9:1
        xorl    %eax, %eax
        addq    $40, %rsp
        retq

We shouldn't step backwards to line 4 between line 7 and 8. I'm pretty sure
this is DAG CSE, but I could be wrong.

I might take a look at this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160202/5533fc46/attachment.html>


More information about the llvm-bugs mailing list