[LLVMbugs] [Bug 1763] New: llc: Couldn't allocate output reg for contraint 'q'!

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Nov 3 15:18:32 PDT 2007


           Summary: llc: Couldn't allocate output reg for contraint 'q'!
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu

kernel/sched.c gives an error in code generator:

$ llvm-gcc testcase-min.i
Couldn't allocate output reg for contraint 'q'!
$ llc bugpoint-reduced-simplified.bc
Couldn't allocate output reg for contraint 'q'!

static inline __attribute__((always_inline)) struct task_struct
*get_current(void) {
       static inline __attribute__((always_inline)) unsigned long
__xchg(unsigned long x, volatile void * ptr, int size) {
      switch (size) {
      case 1:    __asm__ __volatile__("xchgb %b0,%1"     :"=q" (x)     :"m"
(*((volatile long *)(ptr))), "0" (x)     :"memory");
       struct task_struct {
      volatile long state;
       void __attribute__((__section__(".sched.text"))) yield(void) {
      do {
    (void) ((__typeof__(*(&get_current()->state)))__xchg((unsigned
     while (0);

; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout =
target triple = "x86_64-unknown-linux-gnu"

define void @yield() {
        br i1 false, label %bb, label %return

bb:             ; preds = %entry
        %tmp9 = call i64 asm sideeffect "xchgb ${0:b},$1",
"=q,*m,0,~{dirflag},~{fpsr},~{flags},~{memory}"( i64* null, i64 0 )   ; <i64>
        ret void

return:         ; preds = %entry
        ret void

$ llc --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.2svn
  DEBUG build with assertions.
$ uname -a
Linux lightspeed2 2.6.23-rc8-hrt1-cfs-v22-g1bef7dc0-dirty #17 Sun Sep 30
18:49:34 EEST 2007 x86_64 GNU/Linux

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