-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
llvm:GVNGVN and NewGVN stages (Global value numbering)GVN and NewGVN stages (Global value numbering)missed-optimization
Description
; FIXME: This should be promotable, but memdep/gvn don't track values
; path/edge sensitively enough.
define i32 @g(ptr %b, ptr %c) nounwind {
entry:
store i32 1, ptr %b
store i32 2, ptr %c
%t1 = icmp eq ptr %b, null
br i1 %t1, label %bb, label %bb2
bb:
br label %bb2
bb2:
%c_addr.0 = phi ptr [ %b, %entry ], [ %c, %bb ]
%cv = load i32, ptr %c_addr.0, align 4
ret i32 %cv
}
godbolt: https://godbolt.org/z/6PE1MqaYM
This test is marked as XFAIL. It expects no load at the end and return 2.
Metadata
Metadata
Assignees
Labels
llvm:GVNGVN and NewGVN stages (Global value numbering)GVN and NewGVN stages (Global value numbering)missed-optimization