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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs