mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
another (more) aggressive attempt to bring llvm-gcc-i386-linux-selfhost
back to life. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
00a35d0f14
commit
a806be66c1
@ -391,6 +391,8 @@ Instruction *MemCpyOpt::tryMergingIntoMemset(Instruction *StartInst,
|
|||||||
|
|
||||||
Ranges.addStore(Offset, NextStore);
|
Ranges.addStore(Offset, NextStore);
|
||||||
} else {
|
} else {
|
||||||
|
break;
|
||||||
|
|
||||||
MemSetInst *MSI = cast<MemSetInst>(BI);
|
MemSetInst *MSI = cast<MemSetInst>(BI);
|
||||||
|
|
||||||
if (MSI->isVolatile() || ByteVal != MSI->getValue() ||
|
if (MSI->isVolatile() || ByteVal != MSI->getValue() ||
|
||||||
|
@ -173,22 +173,24 @@ entry:
|
|||||||
%0 = bitcast i32* %add.ptr to i8*
|
%0 = bitcast i32* %add.ptr to i8*
|
||||||
tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false)
|
tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false)
|
||||||
ret void
|
ret void
|
||||||
|
;; DISABLED
|
||||||
; CHECK: @test3
|
; CHECK: @test3
|
||||||
; CHECK-NOT: store
|
; HECK-NOT: store
|
||||||
; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
|
; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
|
||||||
}
|
}
|
||||||
|
|
||||||
; store followed by memset, different offset scenario
|
; store followed by memset, different offset scenario
|
||||||
define void @test4(i32* nocapture %P) nounwind ssp {
|
define void @test4(i32* nocapture %P) nounwind ssp {
|
||||||
entry:
|
entry:
|
||||||
|
;; DISABLED
|
||||||
store i32 0, i32* %P, align 4
|
store i32 0, i32* %P, align 4
|
||||||
%add.ptr = getelementptr inbounds i32* %P, i64 1
|
%add.ptr = getelementptr inbounds i32* %P, i64 1
|
||||||
%0 = bitcast i32* %add.ptr to i8*
|
%0 = bitcast i32* %add.ptr to i8*
|
||||||
tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false)
|
tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false)
|
||||||
ret void
|
ret void
|
||||||
; CHECK: @test4
|
; CHECK: @test4
|
||||||
; CHECK-NOT: store
|
; HECK-NOT: store
|
||||||
; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
|
; CHECK-NOT: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 15, i32 4, i1 false)
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
|
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
|
||||||
|
Loading…
x
Reference in New Issue
Block a user