mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Reinstate the optimization from r151449 with a fix to not turn 'gep %x' into
'gep null' when the icmp predicate is unsigned (or is signed without inbounds). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151467 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -634,8 +634,6 @@ define i1 @test62(i8* %a) {
|
||||
%arrayidx2 = getelementptr inbounds i8* %a, i64 10
|
||||
%cmp = icmp slt i8* %arrayidx1, %arrayidx2
|
||||
ret i1 %cmp
|
||||
; Don't turn a signed cmp of GEPs into an index compare.
|
||||
; CHECK: @test62
|
||||
; CHECK: %cmp = icmp slt i8* %arrayidx1, %arrayidx2
|
||||
; CHECK-NEXT: ret i1 %cmp
|
||||
; CHECK-NEXT: ret i1 true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user