1; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-unknown -mcpu=pwr8 | FileCheck %s
2
3; Ensure this does not crash
4
5define <2 x i8> @test1(<2 x i8> %a) {
6  %1 = shl nuw <2 x i8> %a, <i8 7, i8 7>
7  %2 = ashr exact <2 x i8> %1, <i8 7, i8 7>
8  ret <2 x i8> %2
9}
10; CHECK-LABEL: @test1
11; CHECK: vspltisb [[REG1:[0-9]+]], 7
12; CHECK: vslb [[REG2:[0-9]+]], 2, [[REG1]]
13; CHECK: vsrab [[REG3:[0-9]+]], [[REG2]], [[REG1]]
14
15define <2 x i16> @test2(<2 x i16> %a) {
16  %1 = shl nuw <2 x i16> %a, <i16 15, i16 15>
17  %2 = ashr exact <2 x i16> %1, <i16 15, i16 15>
18  ret <2 x i16> %2
19}
20
21; CHECK-LABEL: @test2
22; CHECK: vspltish [[REG1:[0-9]+]], 15
23; CHECK: vslh [[REG2:[0-9]+]], 2, [[REG1]]
24; CHECK: vsrah [[REG3:[0-9]+]], [[REG2]], [[REG1]]
25