aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/lbz-from-ld-shift.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/PowerPC/lbz-from-ld-shift.ll')
-rw-r--r--test/CodeGen/PowerPC/lbz-from-ld-shift.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/lbz-from-ld-shift.ll b/test/CodeGen/PowerPC/lbz-from-ld-shift.ll
new file mode 100644
index 000000000000..3eacd6a45fb4
--- /dev/null
+++ b/test/CodeGen/PowerPC/lbz-from-ld-shift.ll
@@ -0,0 +1,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 }
+