• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 {
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 {
12entry:
13; ELF64: shl_reg
14; ELF64: slw
15  %shl = shl i32 %src1, %src2
16  ret i32 %shl
17}
18
19define i32 @lshr() nounwind {
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 {
28entry:
29; ELF64: lshr_reg
30; ELF64: srw
31  %lshr = lshr i32 %src1, %src2
32  ret i32 %lshr
33}
34
35define i32 @ashr() nounwind {
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 {
44entry:
45; ELF64: ashr_reg
46; ELF64: sraw
47  %ashr = ashr i32 %src1, %src2
48  ret i32 %ashr
49}
50
51