brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · aaea3fd Raw
63 lines · plain
1; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -print-after=localstackalloc <%s >%t 2>&1 && FileCheck <%t %s2 3; Due to a bug in isFrameOffsetLegal we ended up with resolveFrameIndex creating4; addresses with out-of-range displacements.  Verify that this no longer happens.5; CHECK-NOT: LD {{3276[8-9]}}6; CHECK-NOT: LD {{327[7-9][0-9]}}7; CHECK-NOT: LD {{32[8-9][0-9][0-9]}}8; CHECK-NOT: LD {{3[3-9][0-9][0-9][0-9]}}9; CHECK-NOT: LD {{[4-9][0-9][0-9][0-9][0-9]}}10; CHECK-NOT: LD {{[1-9][0-9][0-9][0-9][0-9][0-9]+}}11 12target datalayout = "e-m:e-i64:64-n32:64"13target triple = "powerpc64le-unknown-linux-gnu"14 15%struct.S2760 = type { <2 x float>, %struct.anon, i32, [28 x i8] }16%struct.anon = type { [11 x %struct.anon.0], i64, [6 x { i64, i64 }], [24 x i8] }17%struct.anon.0 = type { [30 x %union.U4DI], i8, [0 x i16], [30 x i8] }18%union.U4DI = type { <4 x i64> }19 20@s2760 = external global %struct.S276021@fails = external global i3222 23define void @check2760(ptr noalias sret(%struct.S2760) %agg.result, ptr byval(%struct.S2760) align 16, ptr %arg1, ptr byval(%struct.S2760) align 16) {24entry:25  %arg0 = alloca %struct.S2760, align 3226  %arg2 = alloca %struct.S2760, align 3227  %arg1.addr = alloca ptr, align 828  %ret = alloca %struct.S2760, align 3229  %b1 = alloca %struct.S2760, align 3230  %b2 = alloca %struct.S2760, align 3231  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %arg0, ptr align 16 %0, i64 11104, i1 false)32  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %arg2, ptr align 16 %1, i64 11104, i1 false)33  store ptr %arg1, ptr %arg1.addr, align 834  call void @llvm.memset.p0.i64(ptr align 32 %ret, i8 0, i64 11104, i1 false)35  call void @llvm.memset.p0.i64(ptr align 32 %b1, i8 0, i64 11104, i1 false)36  call void @llvm.memset.p0.i64(ptr align 32 %b2, i8 0, i64 11104, i1 false)37  %b = getelementptr inbounds %struct.S2760, ptr %arg0, i32 0, i32 138  %g = getelementptr inbounds %struct.anon, ptr %b, i32 0, i32 139  %2 = load i64, ptr %g, align 840  %3 = load i64, ptr getelementptr inbounds (%struct.S2760, ptr @s2760, i32 0, i32 1, i32 1), align 841  %cmp = icmp ne i64 %2, %342  br i1 %cmp, label %if.then, label %if.end43 44if.then:                                          ; preds = %entry45  %4 = load i32, ptr @fails, align 446  %inc = add nsw i32 %4, 147  store i32 %inc, ptr @fails, align 448  br label %if.end49 50if.end:                                           ; preds = %if.then, %entry51  %5 = load i64, ptr getelementptr inbounds (%struct.S2760, ptr @s2760, i32 0, i32 1, i32 1), align 852  %b3 = getelementptr inbounds %struct.S2760, ptr %ret, i32 0, i32 153  %g4 = getelementptr inbounds %struct.anon, ptr %b3, i32 0, i32 154  store i64 %5, ptr %g4, align 855  call void @llvm.memcpy.p0.p0.i64(ptr align 32 %agg.result, ptr align 32 %ret, i64 11104, i1 false)56  ret void57}58 59declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64, i1)60 61declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1)62 63