From 1591cf0cef50ff433205cb4b5e9ac7b824b6bfa7 Mon Sep 17 00:00:00 2001 From: Gerolf Hoflehner Date: Mon, 20 Oct 2014 16:08:33 +0000 Subject: [PATCH] [AArch64] test case for compfail fixed by r219748 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220206 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/AArch64/arm64-bcc.ll | 38 +++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/test/CodeGen/AArch64/arm64-bcc.ll b/test/CodeGen/AArch64/arm64-bcc.ll index 44530d938b9..138ae903609 100644 --- a/test/CodeGen/AArch64/arm64-bcc.ll +++ b/test/CodeGen/AArch64/arm64-bcc.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=arm64-apple-darwint | FileCheck %s +; RUN: llc < %s -mtriple=arm64-apple-darwin | FileCheck %s ; Checks for conditional branch b.vs ; Function Attrs: nounwind @@ -18,9 +18,43 @@ entry: ; CHECK: b.vs } +%S64 = type <{ i64 }> +%S32 = type <{ i32 }> +%Sstruct = type <{ %S64, %S32 }> + +; Checks for compfail when optimizing csincr-cbz sequence + +define { i64, i1 } @foo(i64* , %Sstruct* , i1, i64) { +entry: + %.sroa.0 = alloca i72, align 16 + %.count.value = getelementptr inbounds %Sstruct* %1, i64 0, i32 0, i32 0 + %4 = load i64* %.count.value, align 8 + %.repeatedValue.value = getelementptr inbounds %Sstruct* %1, i64 0, i32 1, i32 0 + %5 = load i32* %.repeatedValue.value, align 8 + %6 = icmp eq i64 %4, 0 + br label %7 + +;