1; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
2
3define i32 @shl() nounwind ssp {
4entry:
5; ELF64: shl
6; ELF64: slw
7  %shl = shl i32 -1, 2
8  ret i32 %shl
9}
10
11define i32 @shl_reg(i32 %src1, i32 %src2) nounwind ssp {
12entry:
13; ELF64: shl_reg
14; ELF64: slw
15  %shl = shl i32 %src1, %src2
16  ret i32 %shl
17}
18
19define i32 @lshr() nounwind ssp {
20entry:
21; ELF64: lshr
22; ELF64: srw
23  %lshr = lshr i32 -1, 2
24  ret i32 %lshr
25}
26
27define i32 @lshr_reg(i32 %src1, i32 %src2) nounwind ssp {
28entry:
29; ELF64: lshr_reg
30; ELF64: srw
31  %lshr = lshr i32 %src1, %src2
32  ret i32 %lshr
33}
34
35define i32 @ashr() nounwind ssp {
36entry:
37; ELF64: ashr
38; ELF64: srawi
39  %ashr = ashr i32 -1, 2
40  ret i32 %ashr
41}
42
43define i32 @ashr_reg(i32 %src1, i32 %src2) nounwind ssp {
44entry:
45; ELF64: ashr_reg
46; ELF64: sraw
47  %ashr = ashr i32 %src1, %src2
48  ret i32 %ashr
49}
50
51