Closed mrvacbob closed 14 years ago
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: 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 parser at end of file Code generation 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)
~/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:
Dup of llvm/llvm-project#5763
This bug has been marked as a duplicate of bug llvm/llvm-project#5763
Bugpoint reduction
Confirmed. Reducing.
Please attach LLVM IR of the testcase in question (just add -emit-llvm to the cmdline)
Extended Description
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; }