http://llvm.org/bugs/show_bug.cgi?id=2581
Summary: Useless select not removed
Product: new-bugs
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
In the following fairly trivial program, the select is obviously completely
useless. However, it is not removed when running opt -std-compile-opts.
define i32 @run(i1 %C) nounwind {
br i1 %C, label %exit, label %body
body: ; preds = %0
%A = select i1 %C, i32 10, i32 11 ; <i32> [#uses=1]
ret i32 %A
exit: ; preds = %0
ret i32 10
}
If I do a conditional branch instead of a select, simplifycfg seems to catch
that and remove the conditional. It makes sense that simlifycfg doesn't remove
a select, but I'm not sure which pass should catch this. I guess SCCP or
CondProp would be a good condidate?
--
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