1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=instcombine,verify < %s | FileCheck %s
4 define <vscale x 4 x i32> @alloca(<vscale x 4 x i32> %z) {
5 ; CHECK-LABEL: @alloca(
6 ; CHECK-NEXT: ret <vscale x 4 x i32> [[Z:%.*]]
8 %a = alloca <vscale x 4 x i32>
9 store <vscale x 4 x i32> %z, ptr %a
10 %load = load <vscale x 4 x i32>, ptr %a
11 ret <vscale x 4 x i32> %load
14 define void @alloca_dead_store(<vscale x 4 x i32> %z) {
15 ; CHECK-LABEL: @alloca_dead_store(
16 ; CHECK-NEXT: ret void
18 %a = alloca <vscale x 4 x i32>
19 store <vscale x 4 x i32> %z, ptr %a
23 declare void @use(...)
24 define void @alloca_zero_byte_move_first_inst() {
25 ; CHECK-LABEL: @alloca_zero_byte_move_first_inst(
26 ; CHECK-NEXT: [[B:%.*]] = alloca {}, align 8
27 ; CHECK-NEXT: [[A:%.*]] = alloca <vscale x 16 x i8>, align 16
28 ; CHECK-NEXT: call void (...) @use(ptr nonnull [[A]])
29 ; CHECK-NEXT: call void (...) @use(ptr nonnull [[B]])
30 ; CHECK-NEXT: ret void
32 %a = alloca <vscale x 16 x i8>
33 call void (...) @use( ptr %a )
35 call void (...) @use( ptr %b )