[LLVMbugs] [Bug 5632] New: Assertion failure in handlePhysicalRegisterDef/ LiveIntervalAnalysis.cpp

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Nov 27 19:19:02 PST 2009


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

           Summary: Assertion failure in
                    handlePhysicalRegisterDef/LiveIntervalAnalysis.cpp
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: astrange at ithinksw.com
                CC: llvmbugs at cs.uiuc.edu


Using checker-227 on x86_64.

Source:
typedef unsigned char uint8_t;
typedef long x86_reg;

void add_hfyu_median_prediction_cmov(uint8_t *dst, const uint8_t *top, const
uint8_t *diff, int w, int *left, int *left_top) {
    x86_reg w2 = -w;
    x86_reg x;
    int l = *left & 0xff;
    int tl = *left_top & 0xff;
    int t;
    __asm__ volatile(
        "mov    %7, %3 \n"
        "1: \n"
        "movzx (%3,%4), %2 \n"
        "mov    %2, %k3 \n"
        "sub   %b1, %b3 \n"
        "add   %b0, %b3 \n"
        "mov    %2, %1 \n"
        "cmp    %0, %2 \n"
        "cmovg  %0, %2 \n"
        "cmovg  %1, %0 \n"
        "cmp   %k3, %0 \n"
        "cmovg %k3, %0 \n"
        "mov    %7, %3 \n"
        "cmp    %2, %0 \n"
        "cmovl  %2, %0 \n"
        "add (%6,%4), %b0 \n"
        "mov   %b0, (%5,%4) \n"
        "inc    %4 \n"
        "jl 1b \n"
        :"+&q"(l), "+&q"(tl), "=&r"(t), "=&q"(x), "+&r"(w2)
        :"r"(dst+w), "r"(diff+w), "rm"(top+w)
    );
    *left = l;
    *left_top = tl;
}

> ~/checker-227/bin/clang -O3 -arch x86_64 -S liveintervalassert.i
Assertion failed: (!mi->getOperand(DefIdx).isEarlyClobber() && "Two address
instruction is an early clobber?"), function handlePhysicalRegisterDef, file
LiveIntervalAnalysis.cpp, line 525.
[...]
Stack dump:
0.      Program arguments: /Users/astrange/checker-227/bin/../libexec/clang-cc
-triple x86_64-apple-darwin10.0 -S -disable-free -main-file-name
liveintervalassert.i --relocation-model pic -pic-level=1 --disable-fp-elim
--unwind-tables=1 --mcpu=core2 --fmath-errno=0 -O3 -fmessage-length 80
-fexceptions=0 -fdiagnostics-show-option -fcolor-diagnostics -o
liveintervalassert.s -x cpp-output liveintervalassert.i 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Live Interval Analysis' on function
'@add_hfyu_median_prediction_cmov'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list