1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; Test that we compile the HVX dual output intrinsics.
6 ; CHECK: v{{[0-9]+}}.w = vadd(v{{[0-9]+}}.w,v{{[0-9]+}}.w,q{{[0-3]}}):carry
7 define inreg <32 x i32> @f0(<32 x i32> %a0, <32 x i32> %a1, i8* nocapture readonly %a2) #0 {
9 %v0 = bitcast i8* %a2 to <32 x i32>*
10 %v1 = load <32 x i32>, <32 x i32>* %v0, align 128
11 %v2 = tail call <128 x i1> @llvm.hexagon.V6.vandvrt.128B(<32 x i32> %v1, i32 -1)
12 %v3 = tail call { <32 x i32>, <128 x i1> } @llvm.hexagon.V6.vaddcarry.128B(<32 x i32> %a0, <32 x i32> %a1, <128 x i1> %v2)
13 %v4 = extractvalue { <32 x i32>, <128 x i1> } %v3, 0
18 ; CHECK: v{{[0-9]+}}.w = vsub(v{{[0-9]+}}.w,v{{[0-9]+}}.w,q{{[0-3]}}):carry
19 define inreg <32 x i32> @f1(<32 x i32> %a0, <32 x i32> %a1, i8* nocapture readonly %a2) #0 {
21 %v0 = bitcast i8* %a2 to <32 x i32>*
22 %v1 = load <32 x i32>, <32 x i32>* %v0, align 128
23 %v2 = tail call <128 x i1> @llvm.hexagon.V6.vandvrt.128B(<32 x i32> %v1, i32 -1)
24 %v3 = tail call { <32 x i32>, <128 x i1> } @llvm.hexagon.V6.vsubcarry.128B(<32 x i32> %a0, <32 x i32> %a1, <128 x i1> %v2)
25 %v4 = extractvalue { <32 x i32>, <128 x i1> } %v3, 0
29 ; Function Attrs: nounwind readnone
30 declare { <32 x i32>, <128 x i1> } @llvm.hexagon.V6.vaddcarry.128B(<32 x i32>, <32 x i32>, <128 x i1>) #1
32 ; Function Attrs: nounwind readnone
33 declare { <32 x i32>, <128 x i1> } @llvm.hexagon.V6.vsubcarry.128B(<32 x i32>, <32 x i32>, <128 x i1>) #1
35 ; Function Attrs: nounwind readnone
36 declare <128 x i1> @llvm.hexagon.V6.vandvrt.128B(<32 x i32>, i32) #1
38 attributes #0 = { nounwind "target-cpu"="hexagonv65" "target-features"="+hvxv65,+hvx-length128b" }
39 attributes #1 = { nounwind readnone }