diff --git a/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll b/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll --- a/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll +++ b/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll @@ -5,36 +5,35 @@ entry: %n.addr = alloca i32, align 4 %count = alloca i32, align 4 - store i32 %n, i32* %n.addr, align 4 - %0 = bitcast i32* %count to i8* - store i32 0, i32* %count, align 4 + store i32 %n, ptr %n.addr, align 4 + store i32 0, ptr %count, align 4 br label %while.cond while.cond: ; preds = %if.end, %entry - %1 = load i32, i32* %count, align 4 - %2 = load i32, i32* %n.addr, align 4 - %cmp = icmp ule i32 %1, %2 + %0 = load i32, ptr %count, align 4 + %1 = load i32, ptr %n.addr, align 4 + %cmp = icmp ule i32 %0, %1 br i1 %cmp, label %while.body, label %while.end while.body: ; preds = %while.cond - %3 = load i32, i32* %count, align 4 - %rem = urem i32 %3, 2 + %2 = load i32, ptr %count, align 4 + %rem = urem i32 %2, 2 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %if.then, label %if.else if.then: ; preds = %while.body - %4 = load i32, i32* %count, align 4 - %add = add i32 %4, 1 - store i32 %add, i32* %count, align 4 + %3 = load i32, ptr %count, align 4 + %add = add i32 %3, 1 + store i32 %add, ptr %count, align 4 br label %if.end ; CHECK: if.then: ; CHECK: br label %while.cond, !llvm.loop !0 if.else: ; preds = %while.body - %5 = load i32, i32* %count, align 4 - %add2 = add i32 %5, 2 - store i32 %add2, i32* %count, align 4 + %4 = load i32, ptr %count, align 4 + %add2 = add i32 %4, 2 + store i32 %add2, ptr %count, align 4 br label %if.end ; CHECK: if.else: @@ -44,7 +43,6 @@ br label %while.cond, !llvm.loop !0 while.end: ; preds = %while.cond - %6 = bitcast i32* %count to i8* ret void } @@ -71,7 +69,7 @@ ; } ; return sum; ; } -define i32 @test2(i32 %a, i32 %b, i32 %step, i32 %remainder, i32* %input) { +define i32 @test2(i32 %a, i32 %b, i32 %step, i32 %remainder, ptr %input) { entry: br label %while.cond @@ -93,8 +91,8 @@ %k.07 = phi i32 [ 0, %while.body ], [ %inc, %for.body ] %add2 = add nsw i32 %k.07, %add %idxprom = sext i32 %add2 to i64 - %arrayidx = getelementptr inbounds i32, i32* %input, i64 %idxprom - %0 = load i32, i32* %arrayidx, align 4 + %arrayidx = getelementptr inbounds i32, ptr %input, i64 %idxprom + %0 = load i32, ptr %arrayidx, align 4 %1 = tail call i32 asm sideeffect "add ${0:w}, ${1:w}\0A", "=r,r,~{cc}"(i32 %0) %inc = add nuw nsw i32 %k.07, 1 %cmp1 = icmp ult i32 %inc, 5