1 ; RUN: llc -march=mips -mcpu=mips32r2 < %s -o /dev/null
3 ; Test that SelectionDAG does not crash during DAGCombine when two pointers
4 ; to the stack match with differing bases and offsets when expanding memcpy.
5 ; This could result in one of the pointers being considered dereferenceable
8 define void @foo(ptr) {
12 %d = getelementptr inbounds [22 x i8], ptr %b, i32 0, i32 2
13 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 6
15 call void @llvm.memcpy.p0.p0.i32(ptr %0, ptr %e, i32 12, i1 false)
19 declare void @llvm.memcpy.p0.p0.i32(ptr, ptr, i32, i1)