1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx | FileCheck %s
2 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128-n32"
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx | FileCheck -check-prefix=CHECK-VSX %s
4 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128-n32"
6 define void @foo1(i16* %p, i16* %r) nounwind {
8 %v = load i16, i16* %p, align 1
9 store i16 %v, i16* %r, align 1
21 define void @foo2(i32* %p, i32* %r) nounwind {
23 %v = load i32, i32* %p, align 1
24 store i32 %v, i32* %r, align 1
36 define void @foo3(i64* %p, i64* %r) nounwind {
38 %v = load i64, i64* %p, align 1
39 store i64 %v, i64* %r, align 1
51 define void @foo4(float* %p, float* %r) nounwind {
53 %v = load float, float* %p, align 1
54 store float %v, float* %r, align 1
66 define void @foo5(double* %p, double* %r) nounwind {
68 %v = load double, double* %p, align 1
69 store double %v, double* %r, align 1
81 define void @foo6(<4 x float>* %p, <4 x float>* %r) nounwind {
83 %v = load <4 x float>, <4 x float>* %p, align 1
84 store <4 x float> %v, <4 x float>* %r, align 1
87 ; These loads and stores are legalized into aligned loads and stores
88 ; using aligned stack slots.
95 ; For VSX on P7, unaligned loads and stores are preferable to aligned
96 ; stack slots, but lvsl/vperm is better still. (On P8 lxvw4x is preferable.)
97 ; Using unaligned stxvw4x is preferable on both machines.