51 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S < %s | FileCheck %s2;3; This caused the code generation to generate invalid code as the same operand4; of the PHI node in the non-affine region was synthesized at the wrong place.5; Check we do not generate wrong code.6;7; CHECK: polly.start8;9; ModuleID = 'bugpoint-reduced-simplified.bc'10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"11 12@connected_passed = external global [256 x i8], align 1613 14; Function Attrs: norecurse nounwind uwtable15define void @InitializeZeroMasks() {16entry:17 br label %for.end2018 19for.end20: ; preds = %entry20 br label %for.body2421 22for.body24: ; preds = %for.body61.preheader, %for.end2023 %indvars.iv = phi i64 [ 0, %for.end20 ], [ %indvars.iv.next, %for.body61.preheader ]24 %arrayidx26 = getelementptr inbounds [256 x i8], ptr @connected_passed, i64 0, i64 %indvars.iv25 store i8 0, ptr %arrayidx26, align 126 %0 = trunc i64 %indvars.iv to i3227 br i1 false, label %for.inc56.4, label %if.then5128 29if.then51: ; preds = %for.inc56.5, %for.body2430 %j.342.lcssa = phi i8 [ 7, %for.body24 ], [ %.mux, %for.inc56.5 ]31 br label %for.body61.preheader32 33for.body61.preheader: ; preds = %for.inc56.5, %if.then5134 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 135 %exitcond = icmp eq i64 %indvars.iv.next, 25636 br i1 %exitcond, label %for.end79, label %for.body2437 38for.end79: ; preds = %for.body61.preheader39 ret void40 41for.inc56.4: ; preds = %for.body2442 br label %for.inc56.543 44for.inc56.5: ; preds = %for.inc56.445 %and49.6 = and i32 %0, 6446 %brmerge = or i1 undef, undef47 %and49.6.lobit = lshr exact i32 %and49.6, 648 %.mux = trunc i32 %and49.6.lobit to i849 br i1 %brmerge, label %if.then51, label %for.body61.preheader50}51