45 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \3; RUN: -stop-after=finalize-isel -verify-machineinstrs | FileCheck %s4define i64 @load(ptr %p) {5 ; CHECK-LABEL: name: load6 ; CHECK: bb.0.entry:7 ; CHECK: liveins: $x38 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x39 ; 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 $x312entry:13 %arrayidx = getelementptr inbounds i64, ptr %p, i64 314 %0 = load i64, ptr %arrayidx, align 215 ret i64 %016}17 18define void @store(ptr %p) {19 ; CHECK-LABEL: name: store20 ; CHECK: bb.0.entry:21 ; CHECK: liveins: $x322 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x323 ; CHECK: [[LI8_:%[0-9]+]]:g8rc = LI8 924 ; CHECK: STD killed [[LI8_]], 16, [[COPY]] :: (store (s64) into %ir.arrayidx, align 1)25 ; CHECK: BLR8 implicit $lr8, implicit $rm26entry:27 %arrayidx = getelementptr inbounds i64, ptr %p, i64 228 store i64 9, ptr %arrayidx, align 129 ret void30}31 32define void @store_aligned(ptr %p) {33 ; CHECK-LABEL: name: store_aligned34 ; CHECK: bb.0.entry:35 ; CHECK: liveins: $x336 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x337 ; CHECK: [[LI8_:%[0-9]+]]:g8rc = LI8 938 ; CHECK: STD killed [[LI8_]], 16, [[COPY]] :: (store (s64) into %ir.arrayidx, align 4)39 ; CHECK: BLR8 implicit $lr8, implicit $rm40entry:41 %arrayidx = getelementptr inbounds i64, ptr %p, i64 242 store i64 9, ptr %arrayidx, align 443 ret void44}45