1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-linux-gnu < %s \
3 ; RUN: 2>&1 | FileCheck --check-prefix=CHECK-LE %s
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff < %s \
5 ; RUN: 2>&1 | FileCheck --check-prefix=CHECK-BE %s
9 define void @foo(i8 %x) {
10 ; CHECK-LE-LABEL: foo:
11 ; CHECK-LE: # %bb.0: # %entry
12 ; CHECK-LE-NEXT: lis 0, -1
13 ; CHECK-LE-NEXT: ori 0, 0, 65534
14 ; CHECK-LE-NEXT: sldi 0, 0, 32
15 ; CHECK-LE-NEXT: oris 0, 0, 65535
16 ; CHECK-LE-NEXT: ori 0, 0, 65504
17 ; CHECK-LE-NEXT: stdux 1, 1, 0
18 ; CHECK-LE-NEXT: .cfi_def_cfa_offset 32
19 ; CHECK-LE-NEXT: li 4, 1
20 ; CHECK-LE-NEXT: li 5, -1
21 ; CHECK-LE-NEXT: addi 6, 1, 32
22 ; CHECK-LE-NEXT: stb 3, 32(1)
23 ; CHECK-LE-NEXT: rldic 4, 4, 31, 32
24 ; CHECK-LE-NEXT: rldic 5, 5, 0, 32
25 ; CHECK-LE-NEXT: stbx 3, 6, 4
26 ; CHECK-LE-NEXT: stbx 3, 6, 5
27 ; CHECK-LE-NEXT: ld 1, 0(1)
30 ; CHECK-BE-LABEL: foo:
31 ; CHECK-BE: # %bb.0: # %entry
32 ; CHECK-BE-NEXT: lis 0, -1
33 ; CHECK-BE-NEXT: ori 0, 0, 65534
34 ; CHECK-BE-NEXT: sldi 0, 0, 32
35 ; CHECK-BE-NEXT: oris 0, 0, 65535
36 ; CHECK-BE-NEXT: ori 0, 0, 65488
37 ; CHECK-BE-NEXT: stdux 1, 1, 0
38 ; CHECK-BE-NEXT: li 4, 1
39 ; CHECK-BE-NEXT: addi 5, 1, 48
40 ; CHECK-BE-NEXT: rldic 4, 4, 31, 32
41 ; CHECK-BE-NEXT: stb 3, 48(1)
42 ; CHECK-BE-NEXT: stbx 3, 5, 4
43 ; CHECK-BE-NEXT: li 4, -1
44 ; CHECK-BE-NEXT: rldic 4, 4, 0, 32
45 ; CHECK-BE-NEXT: stbx 3, 5, 4
46 ; CHECK-BE-NEXT: ld 1, 0(1)
49 %a = alloca i8, i64 4294967296, align 16
50 %c = getelementptr i8, ptr %a, i64 2147483648
51 %d = getelementptr i8, ptr %a, i64 4294967295
52 store volatile i8 %x, ptr %a
53 store volatile i8 %x, ptr %c
54 store volatile i8 %x, ptr %d