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: unassignedb...@nondot.org
Reporter: listm...@philipreames.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs