mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
ObjectSizeOffsetEvaluator: Don't run into infinite recursion if we have a cyclic GEP.
Those can occur in dead code. PR17402. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -126,3 +126,20 @@ define i64 @f12(i64 %x, i64 %y) nounwind {
|
||||
%4 = load i64* %3, align 8
|
||||
ret i64 %4
|
||||
}
|
||||
|
||||
; PR17402
|
||||
; CHECK-LABEL: @f13
|
||||
define void @f13() nounwind {
|
||||
entry:
|
||||
br label %alive
|
||||
|
||||
dead:
|
||||
; Self-refential GEPs can occur in dead code.
|
||||
%incdec.ptr = getelementptr inbounds i32* %incdec.ptr, i64 1
|
||||
; CHECK: %incdec.ptr = getelementptr inbounds i32* %incdec.ptr
|
||||
%l = load i32* %incdec.ptr
|
||||
br label %alive
|
||||
|
||||
alive:
|
||||
ret void
|
||||
}
|
||||
|
Reference in New Issue
Block a user