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=powerpc64le-unknown-linux-gnu -o - %s | FileCheck --check-prefix=LE %s
5 define void @fold_constant_stores_loaddr(i8* %i8_ptr) {
6 ; BE-LABEL: fold_constant_stores_loaddr:
7 ; BE: # %bb.0: # %entry
11 ; BE-NEXT: stb 4, 0(3)
14 ; LE-LABEL: fold_constant_stores_loaddr:
15 ; LE: # %bb.0: # %entry
17 ; LE-NEXT: std 4, 0(3)
20 %i64_ptr = bitcast i8* %i8_ptr to i64*
21 store i64 0, i64* %i64_ptr, align 8
22 store i8 170, i8* %i8_ptr, align 1
27 define void @fold_constant_stores_hiaddr(i8* %i8_ptr) {
28 ; BE-LABEL: fold_constant_stores_hiaddr:
29 ; BE: # %bb.0: # %entry
31 ; BE-NEXT: std 4, 0(3)
33 ; BE-NEXT: stb 4, 0(3)
36 ; LE-LABEL: fold_constant_stores_hiaddr:
37 ; LE: # %bb.0: # %entry
39 ; LE-NEXT: std 4, 0(3)
42 %i64_ptr = bitcast i8* %i8_ptr to i64*
43 store i64 0, i64* %i64_ptr, align 8
44 %i8_ptr2 = getelementptr inbounds i8, i8* %i8_ptr, i64 7
45 store i8 170, i8* %i8_ptr, align 1