diff options
author | Gerolf Hoflehner <ghoflehner@apple.com> | 2014-10-20 16:08:33 +0000 |
---|---|---|
committer | Gerolf Hoflehner <ghoflehner@apple.com> | 2014-10-20 16:08:33 +0000 |
commit | c47baed0b5d906db899419f0d328daeba966ee07 (patch) | |
tree | 6e62eca0c08580c1e92cf88ad658b657e31390aa | |
parent | d05affcc8167627314a5ac6395aac7746927992f (diff) | |
download | bcm5719-llvm-c47baed0b5d906db899419f0d328daeba966ee07.tar.gz bcm5719-llvm-c47baed0b5d906db899419f0d328daeba966ee07.zip |
[AArch64] test case for compfail fixed by r219748
llvm-svn: 220206
-rw-r--r-- | llvm/test/CodeGen/AArch64/arm64-bcc.ll | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-bcc.ll b/llvm/test/CodeGen/AArch64/arm64-bcc.ll index 44530d938b9..138ae903609 100644 --- a/llvm/test/CodeGen/AArch64/arm64-bcc.ll +++ b/llvm/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 + +; <label>:7 ; preds = %entry + %.mask58 = and i32 %5, -2048 + %8 = icmp eq i32 %.mask58, 55296 + %.not134 = xor i1 %8, true + %9 = icmp eq i32 %5, 1114112 + %or.cond135 = and i1 %9, %.not134 + br i1 %or.cond135, label %10, label %.loopexit + +; <label>:10 ; preds = %7 + %11 = and i32 %5, -2048 + %12 = icmp eq i32 %11, 55296 + br i1 %12, label %.loopexit, label %10 + + +.loopexit: ; preds = %.entry,%7,%10 + tail call void @llvm.trap() + unreachable +} + ; Function Attrs: nounwind readnone declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32) ; Function Attrs: noreturn nounwind declare void @llvm.trap() - |