[LLVMbugs] [Bug 21035] New: Register clobber information for asm blocks jumped to can be incorrect

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 22 19:38:15 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21035

            Bug ID: 21035
           Summary: Register clobber information for asm blocks jumped to
                    can be incorrect
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ehsan at mozilla.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Consider this test case:

void f() {
  __asm {
    mov edx, 1
    jmp lbl
  }
  __asm {
lbl:
    mov ecx, 2
  }
}

We currently generate the following code:

define void @f() #0 {
entry:
  tail call void asm sideeffect inteldialect "mov edx, $$1\0A\09jmp
L__MSASMLABEL_.0__lbl", "~{edx},~{dirflag},~{fpsr},~{flags}"() #1, !srcloc !5
  tail call void asm sideeffect inteldialect "L__MSASMLABEL_.0__lbl:\0A\09mov
ecx, $$2", "~{ecx},~{dirflag},~{fpsr},~{flags}"() #1, !srcloc !6
  ret void
}

However, the second asm block also clobbers edx, through the jump from the
first one.

-- 
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/20140923/0b33aae3/attachment.html>


More information about the llvm-bugs mailing list