2018-03-08 01:27:18 +08:00
|
|
|
; RUN: llc -march=hexagon -hexagon-align-loads=0 < %s | FileCheck %s
|
2018-02-15 04:46:06 +08:00
|
|
|
|
2016-03-28 23:43:03 +08:00
|
|
|
; CHECK-LABEL: aligned_load:
|
|
|
|
; CHECK: = vmem({{.*}})
|
2018-02-15 04:46:06 +08:00
|
|
|
define <16 x i32> @aligned_load(<16 x i32>* %p, <16 x i32> %a) #0 {
|
2016-03-28 23:43:03 +08:00
|
|
|
%v = load <16 x i32>, <16 x i32>* %p, align 64
|
|
|
|
ret <16 x i32> %v
|
|
|
|
}
|
|
|
|
|
2018-02-15 04:46:06 +08:00
|
|
|
; CHECK-LABEL: aligned_store:
|
|
|
|
; CHECK: vmem({{.*}}) =
|
|
|
|
define void @aligned_store(<16 x i32>* %p, <16 x i32> %a) #0 {
|
2016-03-28 23:43:03 +08:00
|
|
|
store <16 x i32> %a, <16 x i32>* %p, align 64
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-15 04:46:06 +08:00
|
|
|
; CHECK-LABEL: unaligned_load:
|
|
|
|
; CHECK: = vmemu({{.*}})
|
|
|
|
define <16 x i32> @unaligned_load(<16 x i32>* %p, <16 x i32> %a) #0 {
|
2016-03-28 23:43:03 +08:00
|
|
|
%v = load <16 x i32>, <16 x i32>* %p, align 32
|
|
|
|
ret <16 x i32> %v
|
|
|
|
}
|
|
|
|
|
2018-02-15 04:46:06 +08:00
|
|
|
; CHECK-LABEL: unaligned_store:
|
|
|
|
; CHECK: vmemu({{.*}}) =
|
|
|
|
define void @unaligned_store(<16 x i32>* %p, <16 x i32> %a) #0 {
|
2016-03-28 23:43:03 +08:00
|
|
|
store <16 x i32> %a, <16 x i32>* %p, align 32
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-02-15 04:46:06 +08:00
|
|
|
attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }
|