Bugzilla – Bug 548
[instcombine] miscompilation of setcc or setcc in some cases
Last modified: 2005-04-19 10:28:51
You need to log in before you can comment on or make changes to this bug.
The current (20050418) CVS version miscompiles this small program. int foo(int s) { return (s == -1 || s > 0); } int bar(void) { return foo(-1); }
hrm, that would be bad. How can I reproduce this? Using: llvm-gcc t.c -c -o - | llvm-dis compiles bar into "ret int 1", which is correct. What are you using? -Chris
I get this: /* Function Bodies */ int foo(int l1_s) { return ((int )(l1_s > -1)); } int bar(void) { return 0; }
What command are you using? I definitely do not get that. -Chris
ah, by changing the program a bit I was able to trigger this problem. I'm on it. -Chris
This looks like a bug in a patch that went in Sep 28, 2004. Thanks a lot for bringing this to my attention. Here's the fix: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050418/025474.html -Chris
Many thanks for the quick fix. Still I wonder how this could get unnoticed for such a long time... ~Markus