aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/lbz-from-ld-shift.ll
blob: 3eacd6a45fb4778144f452f57c7b91266bb9f53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: llc -mcpu=ppc64 < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"

; Function Attrs: nounwind readonly
define signext i32 @test(i32* nocapture readonly %P) #0 {
entry:
  %0 = load i32* %P, align 4
  %shr = lshr i32 %0, 24
  ret i32 %shr

; CHECK-LABEL: @test
; CHECK: lbz 3, 0(3)
; CHECK: blr
}

attributes #0 = { nounwind readonly }