diff options
author | Stephen Hines <srhines@google.com> | 2014-07-21 00:45:20 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-07-21 00:45:20 -0700 |
commit | c6a4f5e819217e1e12c458aed8e7b122e23a3a58 (patch) | |
tree | 81b7dd2bb4370a392f31d332a566c903b5744764 /test/CodeGen/Thumb | |
parent | 19c6fbb3e8aaf74093afa08013134b61fa08f245 (diff) | |
download | external_llvm-c6a4f5e819217e1e12c458aed8e7b122e23a3a58.zip external_llvm-c6a4f5e819217e1e12c458aed8e7b122e23a3a58.tar.gz external_llvm-c6a4f5e819217e1e12c458aed8e7b122e23a3a58.tar.bz2 |
Update LLVM for rebase to r212749.
Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls
Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
Diffstat (limited to 'test/CodeGen/Thumb')
-rw-r--r-- | test/CodeGen/Thumb/2014-06-10-thumb1-ldst-opt-bug.ll | 18 | ||||
-rw-r--r-- | test/CodeGen/Thumb/dyn-stackalloc.ll | 7 | ||||
-rw-r--r-- | test/CodeGen/Thumb/fastcc.ll | 36 | ||||
-rw-r--r-- | test/CodeGen/Thumb/lit.local.cfg | 3 | ||||
-rw-r--r-- | test/CodeGen/Thumb/thumb-ldm.ll | 1 | ||||
-rw-r--r-- | test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll | 1 |
6 files changed, 60 insertions, 6 deletions
diff --git a/test/CodeGen/Thumb/2014-06-10-thumb1-ldst-opt-bug.ll b/test/CodeGen/Thumb/2014-06-10-thumb1-ldst-opt-bug.ll new file mode 100644 index 0000000..ae66369 --- /dev/null +++ b/test/CodeGen/Thumb/2014-06-10-thumb1-ldst-opt-bug.ll @@ -0,0 +1,18 @@ +; RUN: llc < %s -mtriple=thumbv6m-eabi -o - | FileCheck %s +; XFAIL: * + +define void @foo(i32* %A) #0 { +entry: +; CHECK-LABEL: foo: +; CHECK: push {r7, lr} +; CHECK: ldm [[REG0:r[0-9]]]!, +; CHECK-NEXT: subs [[REG0]] +; CHECK-NEXT: bl + %0 = load i32* %A, align 4 + %arrayidx1 = getelementptr inbounds i32* %A, i32 1 + %1 = load i32* %arrayidx1, align 4 + tail call void @bar(i32* %A, i32 %0, i32 %1) #2 + ret void +} + +declare void @bar(i32*, i32, i32) #1 diff --git a/test/CodeGen/Thumb/dyn-stackalloc.ll b/test/CodeGen/Thumb/dyn-stackalloc.ll index 6bc39af..6c6de55 100644 --- a/test/CodeGen/Thumb/dyn-stackalloc.ll +++ b/test/CodeGen/Thumb/dyn-stackalloc.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -mtriple=thumb-apple-darwin -disable-cgp-branch-opts -disable-post-ra | FileCheck %s -check-prefix=CHECK -check-prefix=RA_GREEDY -; RUN: llc < %s -mtriple=thumb-apple-darwin -disable-cgp-branch-opts -disable-post-ra -regalloc=basic | FileCheck %s -check-prefix=CHECK -check-prefix=RA_BASIC +; RUN: llc < %s -mtriple=thumb-apple-darwin -disable-cgp-branch-opts -disable-post-ra | FileCheck %s +; RUN: llc < %s -mtriple=thumb-apple-darwin -disable-cgp-branch-opts -disable-post-ra -regalloc=basic | FileCheck %s %struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } %struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* } @@ -45,8 +45,7 @@ define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) { ; CHECK: sub sp, # ; CHECK: mov r[[R0:[0-9]+]], sp ; CHECK: str r{{[0-9+]}}, [r[[R0]] -; RA_GREEDY: str r{{[0-9+]}}, [r[[R0]] -; RA_BASIC: stm r[[R0]]! +; CHECK: str r{{[0-9+]}}, [r[[R0]] ; CHECK-NOT: ldr r0, [sp ; CHECK: mov r[[R1:[0-9]+]], sp ; CHECK: subs r[[R2:[0-9]+]], r[[R1]], r{{[0-9]+}} diff --git a/test/CodeGen/Thumb/fastcc.ll b/test/CodeGen/Thumb/fastcc.ll new file mode 100644 index 0000000..98ff684 --- /dev/null +++ b/test/CodeGen/Thumb/fastcc.ll @@ -0,0 +1,36 @@ +; RUN: llc < %s -mcpu=arm926ej-s -mattr=+vfp2 + +; This is a regression test, to ensure that fastcc functions are correctly +; handled when compiling for a processor which has a floating-point unit which +; is not accessible from the selected instruction set. + +target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64" +target triple = "thumbv5e-none-linux-gnueabi" + +; Function Attrs: optsize +define fastcc void @_foo(float %walpha) #0 { +entry: + br label %for.body13 + +for.body13: ; preds = %for.body13, %entry + br i1 undef, label %for.end182.critedge, label %for.body13 + +for.end182.critedge: ; preds = %for.body13 + %conv183 = fpext float %walpha to double + %mul184 = fmul double %conv183, 8.200000e-01 + %conv185 = fptrunc double %mul184 to float + %conv188 = fpext float %conv185 to double + %mul189 = fmul double %conv188, 6.000000e-01 + %conv190 = fptrunc double %mul189 to float + br label %for.body193 + +for.body193: ; preds = %for.body193, %for.end182.critedge + %mul195 = fmul float %conv190, undef + br label %for.body193 +} + +attributes #0 = { optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } + +!llvm.ident = !{!0} + +!0 = metadata !{metadata !"clang version 3.5.0 "} diff --git a/test/CodeGen/Thumb/lit.local.cfg b/test/CodeGen/Thumb/lit.local.cfg index 8a3ba96..98c6700 100644 --- a/test/CodeGen/Thumb/lit.local.cfg +++ b/test/CodeGen/Thumb/lit.local.cfg @@ -1,4 +1,3 @@ -targets = set(config.root.targets_to_build.split()) -if not 'ARM' in targets: +if not 'ARM' in config.root.targets: config.unsupported = True diff --git a/test/CodeGen/Thumb/thumb-ldm.ll b/test/CodeGen/Thumb/thumb-ldm.ll index dd98e6f..95f3edc 100644 --- a/test/CodeGen/Thumb/thumb-ldm.ll +++ b/test/CodeGen/Thumb/thumb-ldm.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -mtriple=thumbv6m-eabi -o - | FileCheck %s +; XFAIL: * @X = external global [0 x i32] ; <[0 x i32]*> [#uses=5] diff --git a/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll b/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll index 06cfd9b..dedc82b 100644 --- a/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll +++ b/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll @@ -1,4 +1,5 @@ ; RUN: llc -mtriple=thumbv6m-eabi %s -o - | FileCheck %s +; XFAIL: * @d = external global [64 x i32] @s = external global [64 x i32] |