[llvm-bugs] [Bug 43182] New: JumpThread/PRE of assumes with partially available conditions
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 30 10:29:53 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43182
Bug ID: 43182
Summary: JumpThread/PRE of assumes with partially available
conditions
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: listmail at philipreames.com
CC: llvm-bugs at lists.llvm.org
define void @test(i1 %cnd, i32* %p, i32 %v) {
br i1 %cnd, label %taken, label %.merge_crit_edge
.merge_crit_edge: ; preds = %0
%load.pre = load i32, i32* %p, align 4
br label %merge
taken: ; preds = %0
store i32 %v, i32* %p, align 4
br label %merge
merge: ; preds = %.merge_crit_edge,
%taken
%load = phi i32 [ %load.pre, %.merge_crit_edge ], [ %v, %taken ]
%c = icmp eq i32 %load, %v
tail call void @llvm.assume(i1 %c)
ret void
}
declare void @llvm.assume(i1)
The assume should be sunk into the .merge_crit_edge as the fact is trivially
known to be true along the taken path.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190830/25a1c11d/attachment.html>
More information about the llvm-bugs
mailing list