[LLVMbugs] [Bug 23741] New: Machine operand's 'IsDead' flag set in the register coalescing pass becomes invalid after virtual register rewriter pass

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 2 18:10:00 PDT 2015


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

            Bug ID: 23741
           Summary: Machine operand's 'IsDead' flag set in the register
                    coalescing pass becomes invalid after virtual register
                    rewriter pass
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: arphaman at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14425
  --> https://llvm.org/bugs/attachment.cgi?id=14425&action=edit
LLVM IR that reproduces the bug.

The register coalescing pass sets the IsDead register flag on a physical
register machine operand while re materializing a COPY instruction. But this
flag isn't cleared in the virtual register rewriter pass, when a virtual
register in one of the machine operand in a successor MBB is replaced with the
same physical register.

This behavior can be observed when running llc and printing the machine
instructions on the attached file 'hoist-common.ll' (llc -march=x86-64
-print-machineinstrs hoist-common.ll). The output after register coalescing
pass has an instruction that marks EAX as dead (%EAX<def,dead> = MOV32r0
%EFLAGS<imp-def,dead>, %AL<imp-def>) in MBB#2, but the output after virtual
register rewriter pass has a KILL instruction that uses EAX (%AL<def> = KILL
%AL, %EAX<imp-use,kill>) in MBB#3, which is a successor to MBB#2.

The commit that introduced the setting of the IsDead machine operand flag in
the re materializer in the register coalescing pass is r184002
(http://llvm.org/viewvc/llvm-project?view=revision&revision=184002).

-- 
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/20150603/3a1ed18f/attachment.html>


More information about the llvm-bugs mailing list