; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2 ; RUN: opt < %s -passes='sroa' -S | FileCheck %s ; RUN: opt < %s -passes='sroa' -S | FileCheck %s ; This test checks that SROA runs mem2reg on arrays of scalable vectors. define [ 2 x ] @alloca( %x, %y) { ; CHECK-LABEL: define [2 x ] @alloca ; CHECK-SAME: ( [[X:%.*]], [[Y:%.*]]) { ; CHECK-NEXT: [[AGG0:%.*]] = insertvalue [2 x ] poison, [[X]], 0 ; CHECK-NEXT: [[AGG1:%.*]] = insertvalue [2 x ] [[AGG0]], [[Y]], 1 ; CHECK-NEXT: ret [2 x ] [[AGG1]] ; %addr = alloca [ 2 x ], align 4 %agg0 = insertvalue [ 2 x ] poison, %x, 0 %agg1 = insertvalue [ 2 x ] %agg0, %y, 1 store [ 2 x ] %agg1, ptr %addr, align 4 %val = load [ 2 x ], ptr %addr, align 4 ret [ 2 x ] %val }