[LLVMbugs] [Bug 8100] New: No way to prevent excessive constant propagation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Sep 7 09:39:36 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8100
Summary: No way to prevent excessive constant propagation
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: marc.glisse at normalesup.org
CC: llvmbugs at cs.uiuc.edu
Hello,
consider this code:
#include <fenv.h>
#include <assert.h>
int main(){
double a=1.1;
double b=10.1;
fesetround(FE_UPWARD);
assert(-((-a)*b)!=a*b);
}
Excessive optimization will remove the double negation. gcc has option
-frounding-math to help with this. Intel's -fp-model strict is not quite as
good (it fails for this example) but it helps (for instance it lets the code
work if I write 1.1 and 10.1 instead of a and b in the assertion). With
llvm-gcc or clang, this always fails at -O1.
A similar option for llvm would be very welcome, there are applications where
rounding in the appropriate direction is crucial (precision and speed come far
behind).
--
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