mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
tighten test2, add a test that it doesn't get transformed in the invalid edge case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84401 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
15d3c05adf
commit
6e85d91144
@ -40,7 +40,7 @@ define i8 @test1() {
|
||||
|
||||
define i8 @test2(i8* %P) {
|
||||
; CHECK: @test2
|
||||
%P2 = getelementptr i8* %P, i32 1000
|
||||
%P2 = getelementptr i8* %P, i32 127
|
||||
store i8 1, i8* %P2 ;; Not dead across memset
|
||||
call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0)
|
||||
%A = load i8* %P2
|
||||
@ -48,6 +48,17 @@ define i8 @test2(i8* %P) {
|
||||
; CHECK: ret i8 1
|
||||
}
|
||||
|
||||
define i8 @test2a(i8* %P) {
|
||||
; CHECK: @test2
|
||||
%P2 = getelementptr i8* %P, i32 126
|
||||
store i8 1, i8* %P2 ;; Dead, clobbered by memset.
|
||||
call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0)
|
||||
%A = load i8* %P2
|
||||
ret i8 %A
|
||||
; CHECK: %A = load i8* %P2
|
||||
; CHECK: ret i8 %A
|
||||
}
|
||||
|
||||
define void @test3(i8* %P) {
|
||||
; CHECK: @test3
|
||||
%P2 = getelementptr i8* %P, i32 2
|
||||
|
Loading…
Reference in New Issue
Block a user