brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · cd759d8 Raw
39 lines · plain
1; RUN: llc -O1 -mtriple=x86_64-unknown-linux-gnu -mcpu=core2 -relocation-model=pic -frame-pointer=all < %s | FileCheck %s2; <rdar://problem/8124405>3 4%struct.type = type { ptr, i32, i8, i32, i8, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, [256 x i32], i32, [257 x i32], [257 x i32], ptr, ptr, ptr, i32, i32, i32, i32, i32, [256 x i8], [16 x i8], [256 x i8], [4096 x i8], [16 x i32], [18002 x i8], [18002 x i8], [6 x [258 x i8]], [6 x [258 x i32]], [6 x [258 x i32]], [6 x [258 x i32]], [6 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }5%struct.subtype = type { ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, ptr, ptr, ptr }6 7define i32 @func(ptr %s) nounwind optsize ssp {8entry:9  %tmp1 = getelementptr inbounds %struct.type, ptr %s, i32 0, i32 110  %tmp2 = load i32, ptr %tmp1, align 811  %tmp3 = icmp eq i32 %tmp2, 1012  %tmp4 = getelementptr inbounds %struct.type, ptr %s, i32 0, i32 4013  br i1 %tmp3, label %bb, label %entry.bb1_crit_edge14 15entry.bb1_crit_edge:16  br label %bb117 18bb:19 20; The point of this code is that %rdi is set to %rdi+64036 for the rep;stosl21; statement. It can be an ADD or LEA instruction, it's not important which one22; it is.23;24; CHECK: # %bb25; CHECK: leaq	64036(%rdx), %rdi26; CHECK: rep;stosl27 28  call void @llvm.memset.p0.i64(ptr align 4 %tmp4, i8 0, i64 84, i1 false)29  %tmp6 = getelementptr inbounds %struct.type, ptr %s, i32 0, i32 6230  store ptr null, ptr %tmp6, align 831  br label %bb132 33bb1:34  store i32 10, ptr %tmp1, align 835  ret i32 4236}37 38declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) nounwind39