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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
[rdivacky@anacreon ~/llvm]$ cat printf.c
int printf(const char *, ...);
int main() {
float f = 3.13;
printf("%f", f);
}
[rdivacky@anacreon ~/llvm]$ ./Release+Asserts/bin/clang -m32 -O2 -S -o -
printf.c | grep creq
creqv 0, 0, 0
[rdivacky@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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs