xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/lbz-from-ld-shift.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mcpu=ppc64 < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-m:e-i64:64-n32:64"
3*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu"
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readonly
6*9880d681SAndroid Build Coastguard Workerdefine signext i32 @test(i32* nocapture readonly %P) #0 {
7*9880d681SAndroid Build Coastguard Workerentry:
8*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* %P, align 4
9*9880d681SAndroid Build Coastguard Worker  %shr = lshr i32 %0, 24
10*9880d681SAndroid Build Coastguard Worker  ret i32 %shr
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test
13*9880d681SAndroid Build Coastguard Worker; CHECK: lbz 3, 0(3)
14*9880d681SAndroid Build Coastguard Worker; CHECK: blr
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind readonly }
18*9880d681SAndroid Build Coastguard Worker
19