Closed llvmbot closed 13 years ago
r133018; I would appreciate if you would write/commit an appropriate test.
oh, forgot to mention that it works just fine at -O0
[rdivacky@anacreon ~/llvm]$ ./Release+Asserts/bin/clang -m32 -O0 -S -o - printf.c | grep creq creqv 6, 6, 6 [rdivacky@anacreon ~/llvm]$
Extended Description
[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); }