brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 75b152f Raw
82 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-zero --test FileCheck --test-arg --check-prefix=CHECK --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck %s --check-prefixes=CHECK,ZERO < %t3 4; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-one --test FileCheck --test-arg --check-prefix=CHECK --test-arg %s --test-arg --input-file %s -o %t5; RUN: FileCheck %s --check-prefixes=CHECK,ONE < %t6 7; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-poison --test FileCheck --test-arg --check-prefix=CHECK --test-arg %s --test-arg --input-file %s -o %t8; RUN: FileCheck %s --check-prefixes=CHECK,POISON < %t9 10 11; CHECK-LABEL: @dyn_alloca(12; ZERO: %alloca = alloca i32, i32 %size, align 413; ONE: %alloca = alloca i32, align 414; POISON: %alloca = alloca i32, i32 %size, align 415define void @dyn_alloca(i32 %size) {16 %alloca = alloca i32, i32 %size17 store i32 0, ptr %alloca18 ret void19}20 21; CHECK-LABEL: @alloca_0_elt(22; ZERO: %alloca = alloca i32, i32 0, align 423; ONE: %alloca = alloca i32, i32 0, align 424; POISON:  %alloca = alloca i32, i32 0, align 425define void @alloca_0_elt() {26 %alloca = alloca i32, i32 027 store i32 0, ptr %alloca28 ret void29}30 31; CHECK-LABEL: @alloca_1_elt(32; ZERO: %alloca = alloca i32, align 433; ONE: %alloca = alloca i32, align 434; POISON: %alloca = alloca i32, align 435define void @alloca_1_elt() {36 %alloca = alloca i32, i32 137 store i32 0, ptr %alloca38 ret void39}40 41; CHECK-LABEL: @alloca_1024_elt(42; ZERO: %alloca = alloca i32, i32 1024, align 443; ONE: %alloca = alloca i32, align 444; POISON: %alloca = alloca i32, i32 1024, align 445define void @alloca_1024_elt() {46 %alloca = alloca i32, i32 102447 store i32 0, ptr %alloca48 ret void49}50 51; CHECK-LABEL: @alloca_poison_elt(52; ZERO: %alloca = alloca i32, i32 poison, align 453; ONE: %alloca = alloca i32, align 454; POISON: %alloca = alloca i32, i32 poison, align 455define void @alloca_poison_elt() {56 %alloca = alloca i32, i32 poison57 store i32 0, ptr %alloca58 ret void59}60 61; CHECK-LABEL: @alloca_constexpr_elt(62; ZERO: %alloca = alloca i32, i32 ptrtoint (ptr @alloca_constexpr_elt to i32)63; ONE: %alloca = alloca i32, align 464; POISON: %alloca = alloca i32, i32 ptrtoint (ptr @alloca_constexpr_elt to i32)65define void @alloca_constexpr_elt() {66 %alloca = alloca i32, i32 ptrtoint (ptr @alloca_constexpr_elt to i32)67 store i32 0, ptr %alloca68 ret void69}70 71; CHECK-LABEL: @alloca_lifetimes(72; ZERO: call void @llvm.lifetime.start.p0(ptr %alloca)73; ONE: call void @llvm.lifetime.start.p0(ptr %alloca)74; POISON: call void @llvm.lifetime.start.p0(ptr %alloca)75define void @alloca_lifetimes() {76  %alloca = alloca i3277  call void @llvm.lifetime.start.p0(ptr %alloca)78  store i32 0, ptr %alloca79  call void @llvm.lifetime.end.p0(ptr %alloca)80  ret void81}82