http://llvm.org/bugs/show_bug.cgi?id=18754
Bug ID: 18754
Summary: Propagation of select values when followed by branch
on same condition
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following code (with the knowledge that %data != null) is not optimised:
%1 = icmp eq i32 %flag, 1
%2 = select i1 %1, %foo* %data, %foo* null
%3 = icmp eq %foo* %2, null
br i1 %3, label %failure, label %success
Ideally LLVM would notice that %1 == !%3, and therefore that it can be changed
to:
%1 = icmp eq i32 %flag, 1
br i1 %1, label %success, label %failure
with %2 replaced by %data in %success (and its successors), and %2 replaced by
null in %failure.
Discussion on LLVMdev suggests this is related to: pr13307, pr10254, pr13590
--
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