xref: /llvm-project/llvm/test/Transforms/SLPVectorizer/PowerPC/aggregate.ll (revision 580210a0c938531ef9fd79f9ffedb93eeb2e66c2)
1cee313d2SEric Christopher; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
23be72f40SBjorn Pettersson; RUN: opt -S -mtriple=powerpc64-linux-gnu -mcpu=pwr9 -mattr=+vsx -passes=slp-vectorizer < %s | FileCheck %s
3cee313d2SEric Christopher
4*580210a0SNikita Popov%struct.S = type { ptr, ptr }
5cee313d2SEric Christopher
6cee313d2SEric Christopher@kS0 = common global %struct.S zeroinitializer, align 8
7cee313d2SEric Christopher
8cee313d2SEric Christopherdefine { i64, i64 } @getS() {
9cee313d2SEric Christopher; CHECK-LABEL: @getS(
10cee313d2SEric Christopher; CHECK-NEXT:  entry:
11*580210a0SNikita Popov; CHECK-NEXT:    [[TMP0:%.*]] = load i64, ptr @kS0, align 8
12*580210a0SNikita Popov; CHECK-NEXT:    [[TMP1:%.*]] = load i64, ptr getelementptr inbounds ([[STRUCT_S:%.*]], ptr @kS0, i64 0, i32 1), align 8
13cee313d2SEric Christopher; CHECK-NEXT:    [[TMP2:%.*]] = insertvalue { i64, i64 } undef, i64 [[TMP0]], 0
14cee313d2SEric Christopher; CHECK-NEXT:    [[TMP3:%.*]] = insertvalue { i64, i64 } [[TMP2]], i64 [[TMP1]], 1
15cee313d2SEric Christopher; CHECK-NEXT:    ret { i64, i64 } [[TMP3]]
16cee313d2SEric Christopher;
17cee313d2SEric Christopherentry:
18*580210a0SNikita Popov  %0 = load i64, ptr @kS0, align 8
19*580210a0SNikita Popov  %1 = load i64, ptr getelementptr inbounds (%struct.S, ptr @kS0, i64 0, i32 1), align 8
20cee313d2SEric Christopher  %2 = insertvalue { i64, i64 } undef, i64 %0, 0
21cee313d2SEric Christopher  %3 = insertvalue { i64, i64 } %2, i64 %1, 1
22cee313d2SEric Christopher  ret { i64, i64 } %3
23cee313d2SEric Christopher}
24cee313d2SEric Christopher
25