[LLVMbugs] [Bug 4517] New: missed constant fold
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Jul 7 22:24:56 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4517
Summary: missed constant fold
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu
I saw this constant expression in real code after llvm-g++ -O2:
declare extern_weak i32 @0(i64)
define void @foo() {
br i1 icmp eq (i32 zext (i1 icmp ne (i32 (i64)* @0, i32 (i64)* null) to i32),
i32 0), label %cond_true, label %cond_false
cond_true:
ret void
cond_false:
ret void
}
That branch expression should be reduced to:
i1 icmp eq (i32 (i64)* @0, i32 (i64)* null)
It's probably not a perf issue, I just happened to see it while examining
something else and didn't want to forget about it.
--
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