mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
fix PR12075, a regression in a recent transform I added. In unreachable code, gep chains can be infinite. Just like "stripPointerCasts", use a set to keep track of visited instructions so we don't recurse infinitely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -463,3 +463,13 @@ define i1 @alloca_compare(i64 %idx) {
|
||||
; CHECK: alloca_compare
|
||||
; CHECK: ret i1 false
|
||||
}
|
||||
|
||||
; PR12075
|
||||
define i1 @infinite_gep() {
|
||||
ret i1 1
|
||||
|
||||
unreachableblock:
|
||||
%X = getelementptr i32 *%X, i32 1
|
||||
%Y = icmp eq i32* %X, null
|
||||
ret i1 %Y
|
||||
}
|
||||
|
Reference in New Issue
Block a user