summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/Hexagon/isel-vlsr-v2i16.ll
blob: bf176d042c12ade719cb548065421d49048bb787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; RUN: llc -march=hexagon < %s | FileCheck %s

; This used to crash with "cannot select" error.
; CHECK: vlsrh(r1:0,#4)

target triple = "hexagon-unknown-linux-gnu"

define <2 x i16> @foo(ptr nocapture %v) nounwind {
  %vec = load <2 x i32>, ptr %v, align 8
  %trunc = trunc <2 x i32> %vec to <2 x i16>
  %r = lshr <2 x i16> %trunc, <i16 4, i16 4>
  ret <2 x i16> %r
}

attributes #0 = { nounwind "target-cpu"="hexagonv60" }