1; RUN: llc -mcpu=pwr7 -O0 -fast-isel=false -mattr=-vsx < %s | FileCheck %s 2; RUN: llc -mcpu=pwr7 -O0 -fast-isel=false -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-VSX %s 3 4; Verify internal alignment of long double in a struct. The double 5; argument comes in in GPR3; GPR4 is skipped; GPRs 5 and 6 contain 6; the long double. Check that these are stored to proper locations 7; in the parameter save area and loaded from there for return in FPR1/2. 8 9target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" 10target triple = "powerpc64-unknown-linux-gnu" 11 12%struct.S = type { double, ppc_fp128 } 13 14define ppc_fp128 @test(%struct.S* byval %x) nounwind { 15entry: 16 %b = getelementptr inbounds %struct.S, %struct.S* %x, i32 0, i32 1 17 %0 = load ppc_fp128, ppc_fp128* %b, align 16 18 ret ppc_fp128 %0 19} 20 21; CHECK: std 6, 72(1) 22; CHECK: std 5, 64(1) 23; CHECK: std 4, 56(1) 24; CHECK: std 3, 48(1) 25; CHECK: lfd 1, 64(1) 26; CHECK: lfd 2, 72(1) 27 28; CHECK-VSX: std 6, 72(1) 29; CHECK-VSX: std 5, 64(1) 30; CHECK-VSX: std 4, 56(1) 31; CHECK-VSX: std 3, 48(1) 32; CHECK-VSX: li 3, 16 33; CHECK-VSX: addi 4, 1, 48 34; CHECK-VSX: lxsdx 1, 4, 3 35; CHECK-VSX: li 3, 24 36; CHECK-VSX: lxsdx 2, 4, 3 37