• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=lanai-unknown-unknown | FileCheck %s
2
3; Test left-shift i64 lowering does not result in call being inserted.
4
5; CHECK-LABEL: shift
6; CHECKT: bt __ashldi3
7; CHECK: or	%r0, 0x0, %r[[T0:[0-9]+]]
8; CHECK: mov	0x20, %r[[T1:[0-9]+]]
9; CHECK: sub	%r[[T1]], %r[[ShAmt:[0-9]+]], %r[[T1]]
10; CHECK: sub	%r0, %r[[T1]], %r[[T1]]
11; CHECK: sh	%r[[ShOpB:[0-9]+]], %r[[T1]], %r[[T1]]
12; CHECK: sub.f	%r[[ShAmt]], 0x0, %r0
13; CHECK: sel.eq %r0, %r[[T1]], %r[[T1]]
14; CHECK: sh	%r[[ShOpA:[0-9]+]], %r[[ShAmt]], %r[[T2:[0-9]+]]
15; CHECK: or	%r[[T1]], %r[[T2]], %rv
16; CHECK: sub.f	%r[[ShAmt]], 0x20, %r[[T1]]
17; CHECK: sh.pl	%r[[ShOpB]], %r[[T1]], %rv
18; CHECK: sh.mi	%r[[ShOpB]], %r[[ShAmt]], %r[[T0]]
19
20define i64 @shift(i64 inreg, i32 inreg) {
21  %3 = zext i32 %1 to i64
22  %4 = shl i64 %0, %3
23  ret i64 %4
24}
25