|
1 |
| -; RUN: llc -relocation-model=static < %s | FileCheck %s |
2 |
| -; RUN: llc -relocation-model=pic < %s | FileCheck %s |
3 |
| -; RUN: llc -relocation-model=ropi < %s | FileCheck %s |
4 |
| -; RUN: llc -relocation-model=rwpi < %s | FileCheck %s |
5 |
| - |
6 |
| -target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64" |
7 |
| -target triple = "armv7--linux-gnueabihf" |
| 1 | +; RUN: llc -mtriple armv7--linux-gnueabihf -relocation-model=static < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7ARM |
| 2 | +; RUN: llc -mtriple armv7--linux-gnueabihf -relocation-model=pic < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7ARM |
| 3 | +; RUN: llc -mtriple armv7--linux-gnueabihf -relocation-model=ropi < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7ARM |
| 4 | +; RUN: llc -mtriple armv7--linux-gnueabihf -relocation-model=rwpi < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7ARM |
| 5 | +; RUN: llc -mtriple thumbv7--linux-gnueabihf -relocation-model=static < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7THUMB |
| 6 | +; RUN: llc -mtriple thumbv7--linux-gnueabihf -relocation-model=pic < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7THUMB |
| 7 | +; RUN: llc -mtriple thumbv7--linux-gnueabihf -relocation-model=ropi < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7THUMB |
| 8 | +; RUN: llc -mtriple thumbv7--linux-gnueabihf -relocation-model=rwpi < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V7,CHECK-V7THUMB |
| 9 | +; RUN: llc -mtriple thumbv6m--linux-gnueabihf -relocation-model=static < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V6M |
| 10 | +; RUN: llc -mtriple thumbv6m--linux-gnueabihf -relocation-model=pic < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V6M |
| 11 | +; RUN: llc -mtriple thumbv6m--linux-gnueabihf -relocation-model=ropi < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V6M |
| 12 | +; RUN: llc -mtriple thumbv6m--linux-gnueabihf -relocation-model=rwpi < %s | FileCheck %s --check-prefixes=CHECK,CHECK-V6M |
8 | 13 |
|
9 | 14 | @.str = private unnamed_addr constant [2 x i8] c"s\00", align 1
|
10 | 15 | @.str1 = private unnamed_addr constant [69 x i8] c"this string is far too long to fit in a literal pool by far and away\00", align 1
|
@@ -134,18 +139,48 @@ define void @test9() #0 {
|
134 | 139 | ret void
|
135 | 140 | }
|
136 | 141 |
|
| 142 | +; CHECK-LABEL: @test10 |
| 143 | +; CHECK-V6M: adr r{{[0-9]*}}, [[x:.*]] |
| 144 | +; CHECK-V6M: [[x]]: |
| 145 | +; CHECK-V6M: .asciz "s\000\000" |
| 146 | +; CHECK-V7: ldrb{{(.w)?}} r{{[0-9]*}}, [[x:.*]] |
| 147 | +; CHECK-V7: [[x]]: |
| 148 | +; CHECK-V7: .asciz "s\000\000" |
| 149 | +define void @test10(i8* %a) local_unnamed_addr #0 { |
| 150 | + call void @llvm.memmove.p0i8.p0i8.i32(i8* %a, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i32 1, i32 1, i1 false) |
| 151 | + ret void |
| 152 | +} |
| 153 | + |
| 154 | +; CHECK-LABEL: @test11 |
| 155 | +; CHECK-V6M: adr r{{[0-9]*}}, [[x:.*]] |
| 156 | +; CHECK-V6M: [[x]]: |
| 157 | +; CHECK-V6M: .short 3 |
| 158 | +; CHECK-V6M: .short 4 |
| 159 | +; CHECK-V7THUMB: ldrh{{(.w)?}} r{{[0-9]*}}, [[x:.*]] |
| 160 | +; CHECK-V7THUMB: [[x]]: |
| 161 | +; CHECK-V7THUMB: .short 3 |
| 162 | +; CHECK-V7THUMB: .short 4 |
| 163 | +; CHECK-V7ARM: adr r{{[0-9]*}}, [[x:.*]] |
| 164 | +; CHECK-V7ARM: [[x]]: |
| 165 | +; CHECK-V7ARM: .short 3 |
| 166 | +; CHECK-V7ARM: .short 4 |
| 167 | +define void @test11(i16* %a) local_unnamed_addr #0 { |
| 168 | + call void @llvm.memmove.p0i16.p0i16.i32(i16* %a, i16* getelementptr inbounds ([2 x i16], [2 x i16]* @.arr1, i32 0, i32 0), i32 2, i32 2, i1 false) |
| 169 | + ret void |
| 170 | +} |
| 171 | + |
137 | 172 |
|
138 | 173 | declare void @b(i8*) #1
|
139 | 174 | declare void @c(i16*) #1
|
140 | 175 | declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i32, i1)
|
| 176 | +declare void @llvm.memmove.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) local_unnamed_addr |
| 177 | +declare void @llvm.memmove.p0i16.p0i16.i32(i16*, i16*, i32, i32, i1) local_unnamed_addr |
141 | 178 |
|
142 | 179 | attributes #0 = { nounwind "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" }
|
143 | 180 | attributes #1 = { "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" }
|
144 | 181 | attributes #2 = { nounwind }
|
145 | 182 |
|
146 | 183 | !llvm.module.flags = !{!0, !1}
|
147 |
| -!llvm.ident = !{!2} |
148 | 184 |
|
149 | 185 | !0 = !{i32 1, !"wchar_size", i32 4}
|
150 | 186 | !1 = !{i32 1, !"min_enum_size", i32 4}
|
151 |
| -!2 = !{!"Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)"} |
|
0 commit comments