1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -o - %s | FileCheck --check-prefix=BE %s
3 ; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -o - %s | FileCheck --check-prefix=BE %s
4 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - %s | FileCheck --check-prefix=LE %s
6 define void @fold_constant_stores_loaddr(i8* %i8_ptr) {
7 ; BE-LABEL: fold_constant_stores_loaddr:
8 ; BE: # %bb.0: # %entry
10 ; BE-NEXT: std 4, 0(3)
12 ; BE-NEXT: stb 4, 0(3)
15 ; LE-LABEL: fold_constant_stores_loaddr:
16 ; LE: # %bb.0: # %entry
19 ; LE-NEXT: std 4, 0(3)
20 ; LE-NEXT: stb 5, 0(3)
23 %i64_ptr = bitcast i8* %i8_ptr to i64*
24 store i64 0, i64* %i64_ptr, align 8
25 store i8 170, i8* %i8_ptr, align 1
30 define void @fold_constant_stores_hiaddr(i8* %i8_ptr) {
31 ; BE-LABEL: fold_constant_stores_hiaddr:
32 ; BE: # %bb.0: # %entry
34 ; BE-NEXT: std 4, 0(3)
36 ; BE-NEXT: stb 4, 0(3)
39 ; LE-LABEL: fold_constant_stores_hiaddr:
40 ; LE: # %bb.0: # %entry
43 ; LE-NEXT: std 4, 0(3)
44 ; LE-NEXT: stb 5, 0(3)
47 %i64_ptr = bitcast i8* %i8_ptr to i64*
48 store i64 0, i64* %i64_ptr, align 8
49 %i8_ptr2 = getelementptr inbounds i8, i8* %i8_ptr, i64 7
50 store i8 170, i8* %i8_ptr, align 1