https://bugs.llvm.org/show_bug.cgi?id=32153
Bug ID: 32153
Summary: [GVNHoist] Invalid hoist of store
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: gbe...@codeaurora.org
CC: llvm-bugs@lists.llvm.org
GVNHoist hoists the store to @G in the following code, even though the switch
default path directly to %exit does not store to @G. This is a reduced test
case that was reported by Benjamin Kramer when compiling bash with the GVNHoist
pass moved in the pass pipeline to the beginning of the function simplification
phase.
%struct.__jmp_buf_tag = type { [8 x i64], i32 }
@test_exit_buf = global %struct.__jmp_buf_tag zeroinitializer
@G = global i32 0
define void @test_command(i32 %c1) {
entry:
switch i32 %c1, label %exit [
i32 0, label %sw0
i32 1, label %sw1
]
sw0:
store i32 1, i32* @G
br label %exit
sw1:
store i32 1, i32* @G
br label %exit
exit:
call void @longjmp(%struct.__jmp_buf_tag* @test_exit_buf, i32 1) #0
unreachable
}
declare void @longjmp(%struct.__jmp_buf_tag*, i32) #0
attributes #0 = { noreturn nounwind }
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs