blob: 885612d4705a181c68954528dd965b177e171ec4 [file] [log] [blame]
Krzysztof Parzyszekf9d01a12018-01-05 20:48:03 +00001; RUN: llc -march=hexagon < %s | FileCheck %s
2
3; Check that this compiles successfully.
4; CHECK: vpacke
5
6target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
7target triple = "hexagon"
8
9; Function Attrs: norecurse nounwind
Krzysztof Parzyszekcf3ad582018-01-24 17:48:11 +000010define void @fred(<16 x i32> %a0, <16 x i32> %a1) #0 {
Krzysztof Parzyszekf9d01a12018-01-05 20:48:03 +000011b0:
Krzysztof Parzyszekcf3ad582018-01-24 17:48:11 +000012 %v0 = icmp eq <16 x i32> %a0, %a1
13 %v1 = select <16 x i1> %v0, <16 x i32> %a0, <16 x i32> zeroinitializer
Krzysztof Parzyszekf9d01a12018-01-05 20:48:03 +000014 %v2 = trunc <16 x i32> %v1 to <16 x i16>
15 store <16 x i16> %v2, <16 x i16>* undef, align 2
16 ret void
17}
18
19attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvx-length64b,+hvxv60" }