brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5272fce Raw
38 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=instcombine,verify < %s | FileCheck %s3 4define <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:%.*]]7;8  %a = alloca <vscale x 4 x i32>9  store <vscale x 4 x i32> %z, ptr %a10  %load = load <vscale x 4 x i32>, ptr %a11  ret <vscale x 4 x i32> %load12}13 14define void @alloca_dead_store(<vscale x 4 x i32> %z) {15; CHECK-LABEL: @alloca_dead_store(16; CHECK-NEXT:    ret void17;18  %a = alloca <vscale x 4 x i32>19  store <vscale x 4 x i32> %z, ptr %a20  ret void21}22 23declare void @use(...)24define void @alloca_zero_byte_move_first_inst() {25; CHECK-LABEL: @alloca_zero_byte_move_first_inst(26; CHECK-NEXT:    [[B:%.*]] = alloca {}, align 827; CHECK-NEXT:    [[A:%.*]] = alloca <vscale x 16 x i8>, align 1628; CHECK-NEXT:    call void (...) @use(ptr nonnull [[A]])29; CHECK-NEXT:    call void (...) @use(ptr nonnull [[B]])30; CHECK-NEXT:    ret void31;32  %a = alloca <vscale x 16 x i8>33  call void (...) @use( ptr %a )34  %b = alloca {  }35  call void (...) @use( ptr %b )36  ret void37}38