blob: 90629a263f7acb76cb8e8132012da12298f7fb6d [file] [log] [blame]
Jun Bum Lim6a7dc5c2016-07-22 18:27:24 +00001; RUN: opt < %s -basicaa -dse -S -enable-dse-partial-overwrite-tracking | FileCheck %s
2; PR28588
3
4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5target triple = "x86_64-unknown-linux-gnu"
6
7; Function Attrs: nounwind
8define void @_UPT_destroy(i8* nocapture %ptr) local_unnamed_addr #0 {
9entry:
10 %edi = getelementptr inbounds i8, i8* %ptr, i64 8
11
Daniel Neilson1e687242018-01-19 17:13:12 +000012; CHECK-NOT: tail call void @llvm.memset.p0i8.i64(i8* align 8 %edi, i8 0, i64 176, i1 false)
Jun Bum Lim6a7dc5c2016-07-22 18:27:24 +000013; CHECK-NOT: store i32 -1, i32* %addr
14
Daniel Neilson1e687242018-01-19 17:13:12 +000015 tail call void @llvm.memset.p0i8.i64(i8* align 8 %edi, i8 0, i64 176, i1 false)
Jun Bum Lim6a7dc5c2016-07-22 18:27:24 +000016 %format4.i = getelementptr inbounds i8, i8* %ptr, i64 144
17 %addr = bitcast i8* %format4.i to i32*
18 store i32 -1, i32* %addr, align 8
19
20; CHECK: tail call void @free
21 tail call void @free(i8* nonnull %ptr)
22 ret void
23}
24
25; Function Attrs: nounwind
26declare void @free(i8* nocapture) local_unnamed_addr #0
27
28; Function Attrs: argmemonly nounwind
Daniel Neilson1e687242018-01-19 17:13:12 +000029declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) #1
Jun Bum Lim6a7dc5c2016-07-22 18:27:24 +000030
31attributes #0 = { nounwind }
32attributes #1 = { argmemonly nounwind }