Krzysztof Parzyszek | 26d994f | 2018-12-14 22:33:48 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon < %s | FileCheck %s |
| 2 | |
| 3 | ; This used to crash with "cannot select" error. |
| 4 | ; CHECK: vlsrh(r1:0,#4) |
| 5 | |
| 6 | target triple = "hexagon-unknown-linux-gnu" |
| 7 | |
| 8 | define <2 x i16> @foo(<2 x i32>* nocapture %v) nounwind { |
| 9 | %vec = load <2 x i32>, <2 x i32>* %v, align 8 |
| 10 | %trunc = trunc <2 x i32> %vec to <2 x i16> |
| 11 | %r = lshr <2 x i16> %trunc, <i16 4, i16 4> |
| 12 | ret <2 x i16> %r |
| 13 | } |
| 14 | |
| 15 | attributes #0 = { nounwind "target-cpu"="hexagonv60" } |
| 16 | |