1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \
3 ; RUN: -stop-after=finalize-isel -verify-machineinstrs | FileCheck %s
4 define i64 @load(ptr %p) {
5 ; CHECK-LABEL: name: load
8 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x3
9 ; CHECK: [[LD:%[0-9]+]]:g8rc = LD 24, [[COPY]] :: (load (s64) from %ir.arrayidx, align 2)
10 ; CHECK: $x3 = COPY [[LD]]
11 ; CHECK: BLR8 implicit $lr8, implicit $rm, implicit $x3
13 %arrayidx = getelementptr inbounds i64, ptr %p, i64 3
14 %0 = load i64, ptr %arrayidx, align 2
18 define void @store(ptr %p) {
19 ; CHECK-LABEL: name: store
22 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x3
23 ; CHECK: [[LI8_:%[0-9]+]]:g8rc = LI8 9
24 ; CHECK: STD killed [[LI8_]], 16, [[COPY]] :: (store (s64) into %ir.arrayidx, align 1)
25 ; CHECK: BLR8 implicit $lr8, implicit $rm
27 %arrayidx = getelementptr inbounds i64, ptr %p, i64 2
28 store i64 9, ptr %arrayidx, align 1
32 define void @store_aligned(ptr %p) {
33 ; CHECK-LABEL: name: store_aligned
36 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x3
37 ; CHECK: [[LI8_:%[0-9]+]]:g8rc = LI8 9
38 ; CHECK: STD killed [[LI8_]], 16, [[COPY]] :: (store (s64) into %ir.arrayidx, align 4)
39 ; CHECK: BLR8 implicit $lr8, implicit $rm
41 %arrayidx = getelementptr inbounds i64, ptr %p, i64 2
42 store i64 9, ptr %arrayidx, align 4