brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 28dd01a Raw
50 lines · plain
1; RUN: opt < %s -loop-reduce -S2; PR11950: isHighCostExpansion crashes on ConstExpr3;4; The crash happened during IVChain analysis (CollectChains). We don't5; really care how LSR decides to transform this loop, so we don't6; check it. As long as the analysis doesn't crash we're ok.7target datalayout = "e-p:64:64:64-n32:64"8 9%struct.this_structure_s.0.5 = type { [6144 x [8 x i32]], [6144 x [8 x i32]], [6147 x [4 x i32]], [8 x i32], [2 x ptr], [2 x ptr], [6144 x i8], [6144 x i32], [6144 x i32], [4 x [4 x i8]] }10 11define internal fastcc void @someFunction(ptr nocapture %scratch, i32 %stage, i32 %cbSize) nounwind {12entry:13  %0 = getelementptr inbounds %struct.this_structure_s.0.5, ptr %scratch, i32 0, i32 4, i32 %stage14  %1 = load ptr, ptr %0, align 415  %2 = getelementptr inbounds %struct.this_structure_s.0.5, ptr %scratch, i32 0, i32 5, i32 %stage16  %3 = load ptr, ptr %2, align 417  %4 = getelementptr inbounds %struct.this_structure_s.0.5, ptr %scratch, i32 0, i32 2, i32 0, i32 018  %tmp11 = shl i32 %stage, 119  %tmp1325 = or i32 %tmp11, 120  br label %__label_D_160821 22__label_D_1608:                                   ; preds = %__label_D_1608, %entry23  %i.12 = phi i32 [ 0, %entry ], [ %10, %__label_D_1608 ]24  %tmp = shl i32 %i.12, 225  %lvar_g.13 = getelementptr i32, ptr %4, i32 %tmp26  %tmp626 = or i32 %tmp, 127  %scevgep = getelementptr i32, ptr %4, i32 %tmp62628  %tmp727 = or i32 %tmp, 229  %scevgep8 = getelementptr i32, ptr %4, i32 %tmp72730  %tmp928 = or i32 %tmp, 331  %scevgep10 = getelementptr i32, ptr %4, i32 %tmp92832  %scevgep12 = getelementptr %struct.this_structure_s.0.5, ptr %scratch, i32 0, i32 9, i32 %tmp11, i32 %i.1233  %scevgep14 = getelementptr %struct.this_structure_s.0.5, ptr %scratch, i32 0, i32 9, i32 %tmp1325, i32 %i.1234  %5 = load i8, ptr %scevgep12, align 135  %6 = sext i8 %5 to i3236  %7 = load i8, ptr %scevgep14, align 137  %8 = sext i8 %7 to i3238  store i32 0, ptr %lvar_g.13, align 439  store i32 %8, ptr %scevgep, align 440  store i32 %6, ptr %scevgep8, align 441  %9 = add nsw i32 %8, %642  store i32 %9, ptr %scevgep10, align 443  %10 = add nsw i32 %i.12, 144  %exitcond = icmp eq i32 %10, 345  br i1 %exitcond, label %return, label %__label_D_160846 47return:                                           ; preds = %__label_D_160848  ret void49}50