blob: 89352211eda04880b3b6f30c24359bcef0c9d44b [file] [edit]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc -mattr=+sve2p1 < %s | FileCheck %s
target triple = "aarch64-unknown-linux"
define void @predicate_as_counter_phi(i64 %N) {
; CHECK-LABEL: predicate_as_counter_phi:
; CHECK: // %bb.0: // %entry
; CHECK-NEXT: rdvl x8, #2
; CHECK-NEXT: whilelo pn8.h, xzr, x0, vlx4
; CHECK-NEXT: .LBB0_1: // %vector.body
; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
; CHECK-NEXT: // fake_use: $pn8
; CHECK-NEXT: whilelo pn8.h, x8, x0, vlx4
; CHECK-NEXT: incb x8, all, mul #2
; CHECK-NEXT: b .LBB0_1
entry:
%vscale = call i64 @llvm.vscale.i64()
%step = shl nuw i64 %vscale, 5
%pred.entry = call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c16(i64 0, i64 %N, i32 4)
br label %vector.body
vector.body:
%index = phi i64 [ 0, %entry ], [ %index.next, %vector.body ]
%pred = phi target("aarch64.svcount") [ %pred.entry, %entry ], [ %pred.next, %vector.body ]
call void (...) @llvm.fake.use(target("aarch64.svcount") %pred)
%index.next = add i64 %index, %step
%pred.next = call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c16(i64 %index.next, i64 %N, i32 4)
br label %vector.body
exit:
unreachable
}