mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Teach memdep to use pointsToConstantMemory to determine that loads
from constant memory don't alias any stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,6 +25,29 @@ define i8 @test0_no(i8* %a, i8* %b) nounwind {
|
||||
ret i8 %y
|
||||
}
|
||||
|
||||
; CHECK: @test1_yes
|
||||
; CHECK-NEXT: load i8* %b
|
||||
; CHECK-NEXT: store i8 1, i8* %a
|
||||
; CHECK-NEXT: ret i8 %y
|
||||
define i8 @test1_yes(i8* %a, i8* %b) nounwind {
|
||||
store i8 0, i8* %a
|
||||
%y = load i8* %b, !tbaa !5
|
||||
store i8 1, i8* %a
|
||||
ret i8 %y
|
||||
}
|
||||
|
||||
; CHECK: @test1_no
|
||||
; CHECK-NEXT: store i8 0, i8* %a
|
||||
; CHECK-NEXT: load i8* %b
|
||||
; CHECK-NEXT: store i8 1, i8* %a
|
||||
; CHECK-NEXT: ret i8 %y
|
||||
define i8 @test1_no(i8* %a, i8* %b) nounwind {
|
||||
store i8 0, i8* %a
|
||||
%y = load i8* %b, !tbaa !6
|
||||
store i8 1, i8* %a
|
||||
ret i8 %y
|
||||
}
|
||||
|
||||
; Root note.
|
||||
!0 = metadata !{ }
|
||||
; Some type.
|
||||
|
||||
Reference in New Issue
Block a user