[LLVMbugs] [Bug 6576] New: Missed optimisation to remove unnecessary branches involving mul
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 10 13:33:31 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6576
Summary: Missed optimisation to remove unnecessary branches
involving mul
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: arplynn at gmail.com
CC: llvmbugs at cs.uiuc.edu
The following test case:
define i32 @mul(i32 %a, i32 %b) nounwind readnone {
entry:
%cond1 = icmp eq i32 %b, 0 ; <i1> [#uses=1]
br i1 %cond1, label %exit, label %bb.nph
bb.nph: ; preds = %entry
%tmp = mul i32 %b, %a ; <i32> [#uses=1]
ret i32 %tmp
exit: ; preds = %entry
ret i32 0
}
could be reduced to:
define i32 @mul(i32 %a, i32 %b) nounwind readnone {
entry:
%tmp = mul i32 %b, %a
ret i32 %tmp
}
--
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