Skip to content

Commit fe17ce0

Browse files
committed
[PowerPC] add RUN lines for both endians to test; NFC
The load narrowing transform works for both targets, so we might as well test both with simple examples like this.
1 parent ccd7e78 commit fe17ce0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
; RUN: llc -verify-machineinstrs -mcpu=ppc64 < %s | FileCheck %s
2-
target datalayout = "E-m:e-i64:64-n32:64"
3-
target triple = "powerpc64-unknown-linux-gnu"
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc -ppc-asm-full-reg-names -verify-machineinstrs -mtriple=powerpc64-- < %s | FileCheck %s --check-prefixes=BE
3+
; RUN: llc -ppc-asm-full-reg-names -verify-machineinstrs -mtriple=powerpc64le-- < %s | FileCheck %s --check-prefixes=LE
44

5-
; Function Attrs: nounwind readonly
6-
define signext i32 @test(i32* nocapture readonly %P) #0 {
7-
entry:
8-
%0 = load i32, i32* %P, align 4
9-
%shr = lshr i32 %0, 24
5+
define signext i32 @test(i32* nocapture readonly %P) nounwind {
6+
; BE-LABEL: test:
7+
; BE: # %bb.0:
8+
; BE-NEXT: lbz r3, 0(r3)
9+
; BE-NEXT: blr
10+
;
11+
; LE-LABEL: test:
12+
; LE: # %bb.0:
13+
; LE-NEXT: lbz r3, 3(r3)
14+
; LE-NEXT: blr
15+
%t0 = load i32, i32* %P, align 4
16+
%shr = lshr i32 %t0, 24
1017
ret i32 %shr
11-
12-
; CHECK-LABEL: @test
13-
; CHECK: lbz 3, 0(3)
14-
; CHECK: blr
1518
}
16-
17-
attributes #0 = { nounwind readonly }
18-

0 commit comments

Comments
 (0)