[LLVMbugs] [Bug 10136] New: CR6 not being set before a vararg call

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 14 13:47:56 PDT 2011


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

           Summary: CR6 not being set before a vararg call
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rdivacky at freebsd.org
                CC: llvmbugs at cs.uiuc.edu


[rdivacky at anacreon ~/llvm]$ cat printf.c 
int printf(const char *, ...);
int main() {
  float f = 3.13;
  printf("%f", f);
}
[rdivacky at anacreon ~/llvm]$ ./Release+Asserts/bin/clang  -m32 -O2 -S -o -
printf.c  | grep creq
        creqv 0, 0, 0
[rdivacky at anacreon ~/llvm]$ gcc  -m32 -O2 -S -o - printf.c  | grep creq
        creqv 6,6,6

the CR6 is not being, it looks like it's being overwritten as the code there
suggests it should be there:


  // Set CR6 to true if this is a vararg call.
  if (isVarArg) {
    SDValue SetCR(DAG.getMachineNode(PPC::CRSET, dl, MVT::i32), 0);
    Chain = DAG.getCopyToReg(Chain, dl, PPC::CR1EQ, SetCR, InFlag);
    InFlag = Chain.getValue(1);
  }

-- 
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