diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2013-09-26 17:25:10 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2013-09-26 17:25:10 +0000 |
commit | 82f36241c2484a72ba11b7ae5af3f485504a7b6e (patch) | |
tree | afa41a035799d80042cae748eb96cc9a514d66ce /test/CodeGen | |
parent | daf6b948b98b886f5f0fba130e91e01c9ca7c2f2 (diff) | |
download | external_llvm-82f36241c2484a72ba11b7ae5af3f485504a7b6e.zip external_llvm-82f36241c2484a72ba11b7ae5af3f485504a7b6e.tar.gz external_llvm-82f36241c2484a72ba11b7ae5af3f485504a7b6e.tar.bz2 |
Fix PR 17372: Emitting PLD for stack address for ARM Thumb2
t2PLDi12, t2PLDi8, t2PLDs was omitted in Thumb2InstrInfo.
This patch fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/ARM/prefetch-thumb.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/prefetch-thumb.ll b/test/CodeGen/ARM/prefetch-thumb.ll new file mode 100644 index 0000000..e6f6ae8 --- /dev/null +++ b/test/CodeGen/ARM/prefetch-thumb.ll @@ -0,0 +1,22 @@ +; RUN: llc < %s -march=thumb -mattr=+v7 | FileCheck %s -check-prefix=THUMB2 +; TODO: This test case will be merged back into prefetch.ll when ARM mode issue is solved. + +declare void @llvm.prefetch(i8*, i32, i32, i32) nounwind + +define void @t6() { +entry: +;ARM: t6: +;ARM: pld [sp] +;ARM: pld [sp, #50] + +;THUMB2: t6: +;THUMB2: pld [sp] +;THUMB2: pld [sp, #50] + +%red = alloca [100 x i8], align 1 +%0 = getelementptr inbounds [100 x i8]* %red, i32 0, i32 0 +%1 = getelementptr inbounds [100 x i8]* %red, i32 0, i32 50 +call void @llvm.prefetch(i8* %0, i32 0, i32 3, i32 1) +call void @llvm.prefetch(i8* %1, i32 0, i32 3, i32 1) +ret void +} |