brintos

brintos / llvm-project-archived public Read only

0
0
Text · 716 B · 136de5e Raw
20 lines · plain
1; RUN: llc -mtriple=mips -mcpu=mips32r2 < %s -o /dev/null2 3; Test that SelectionDAG does not crash during DAGCombine when two pointers4; to the stack match with differing bases and offsets when expanding memcpy.5; This could result in one of the pointers being considered dereferenceable6; and other not.7 8define void @foo(ptr) {9start:10  %a = alloca [22 x i8]11  %b = alloca [22 x i8]12  %d = getelementptr inbounds [22 x i8], ptr %b, i32 0, i32 213  call void @llvm.memcpy.p0.p0.i32(ptr %a, ptr %d, i32 20, i1 false)14  %e = getelementptr inbounds [22 x i8], ptr %b, i32 0, i32 615  call void @llvm.memcpy.p0.p0.i32(ptr %0, ptr %e, i32 12, i1 false)16  ret void17}18 19declare void @llvm.memcpy.p0.p0.i32(ptr, ptr, i32, i1)20