mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
44a95960ae
This fixes https://llvm.org/PR39983. llvm-svn: 349202
17 lines
440 B
LLVM
17 lines
440 B
LLVM
; 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(<2 x i32>* nocapture %v) nounwind {
|
|
%vec = load <2 x i32>, <2 x i32>* %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" }
|
|
|