blob: 0c1e4cae4d56515766ebf3c59c962a2b1787dbbc [file] [log] [blame]
Krzysztof Parzyszek046090d2018-03-12 14:01:28 +00001; RUN: llc -march=hexagon < %s | FileCheck %s
2
3; Test that V_vzero and W_vzero intrinsics work. The W_vzero intrinsic was added
4; for v65/hvx.
5
6; CHECK-LABEL: f0:
7; CHECK: [[VREG1:v([0-9]+)]] = vxor([[VREG1]],[[VREG1]])
8define void @f0(i16** nocapture %a0) #0 {
9b0:
10 %v0 = bitcast i16** %a0 to <32 x i32>*
11 %v1 = tail call <32 x i32> @llvm.hexagon.V6.vd0.128B()
12 store <32 x i32> %v1, <32 x i32>* %v0, align 64
13 ret void
14}
15
16; Function Attrs: nounwind readnone
17declare <32 x i32> @llvm.hexagon.V6.vd0.128B() #1
18
19; CHECK-LABEL: f1:
20; CHECK: [[VREG2:v([0-9]+):([0-9]+).w]] = vsub([[VREG2]],[[VREG2]])
21define void @f1(i16** nocapture %a0) #0 {
22b0:
23 %v0 = bitcast i16** %a0 to <64 x i32>*
24 %v1 = tail call <64 x i32> @llvm.hexagon.V6.vdd0.128B()
25 store <64 x i32> %v1, <64 x i32>* %v0, align 128
26 ret void
27}
28
29; Function Attrs: nounwind readnone
30declare <64 x i32> @llvm.hexagon.V6.vdd0.128B() #1
31
32attributes #0 = { nounwind "target-cpu"="hexagonv65" "target-features"="+hvxv65,+hvx-length128b" }
33attributes #1 = { nounwind readnone }