[LLVMbugs] [Bug 4914] New: llvm-gcc doesn't do range analysis on induction variable
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Sep 7 12:00:50 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4914
Summary: llvm-gcc doesn't do range analysis on induction variable
Product: libraries
Version: trunk
Platform: PC
URL: http://codepad.org/n6dGCqje
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Loop Optimizer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rjmccall at apple.com
CC: llvmbugs at cs.uiuc.edu
This is a forwarded complaint by "bearophile" on LLVM IRC, who unfortunately
never files bugs. I am willing to act as a stand-in in this case.
The code in the URL produces worse code on (an unspecified version of) llvm-gcc
than (an unspecified version of) gcc does; assembly output from both is inline
in the test.
The difference seems to involve three things:
(1) gcc knows that i is never < 0, and so elides the first check when computing
sat(i).
(2) gcc knows that -i is always <= 0, and so infers that sat(-i) is always 0.
(3) gcc hoists a constant load outside of the loop.
--
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