search for: mem_read_test

Displaying 3 results from an estimated 3 matches for "mem_read_test".

2019 Jul 24
2
Intrinsics InstrReadMem memory properties
...32* %b.addr, align 4 %arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %a, i64 0, i64 0 %0 = bitcast i32* %arraydecay to i8* %1 = load i32, i32* %b.addr, align 4 %2 = trunc i32 %1 to i8 call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 %2, i64 10, i1 false) * tail call void @mem_read_test(i8* %0)* ret void } ; Function Attrs: nounwind readonly declare void @mem_read_test(i8*) #2 However, the call to memset() still got optimized away by DSE. What am I missing here? Or this is indeed a bug in DSE? Son Tuan Vu On Wed, Jul 24, 2019 at 6:47 PM Doerfert, Johannes <jdoerfert at a...
2019 Jul 25
2
Intrinsics InstrReadMem memory properties
...ecay = getelementptr inbounds [10 x i32], [10 x i32]* %a, i64 0, > i64 0 > %0 = bitcast i32* %arraydecay to i8* > %1 = load i32, i32* %b.addr, align 4 > %2 = trunc i32 %1 to i8 > call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 %2, i64 10, i1 false) > * tail call void @mem_read_test(i8* %0)* > ret void > } > > ; Function Attrs: nounwind readonly > declare void @mem_read_test(i8*) #2 > > However, the call to memset() still got optimized away by DSE. What am I > missing here? Or this is indeed a bug in DSE? > > Son Tuan Vu > > > On Wed, J...
2019 Jul 24
2
Intrinsics InstrReadMem memory properties
Hi Johannes, Thanks for your reply. I now see more clearly how things work with these properties. However, what would be an object whose address is potentially known by a callee? I suppose the intrinsic arguments and global variable? So IIUC, if not restricted by *only properties, an intrinsic could access to: - only its arguments if IntrArgMemOnly specified, - its arguments and the global