brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 71cb102 Raw
31 lines · plain
1; RUN: llc < %s -stop-after=finalize-isel -mtriple=x86_64-unknown-linux | FileCheck %s --implicit-check-not=FAKE_USE2;3; Make sure SelectionDAG does not crash handling fake uses of zero-length arrays4; and structs. Check also that they are not propagated.5;6; Generated from the following source with7; clang -fextend-variable-liveness -S -emit-llvm -O2 -mllvm -stop-after=safe-stack -o test.mir test.cpp8;9; int main ()10; { int array[0]; }11;12;13; CHECK: liveins: $[[IN_REG:[a-zA-Z0-9]+]]14; CHECK: %[[IN_VREG:[a-zA-Z0-9]+]]:gr32 = COPY $[[IN_REG]]15; CHECK: FAKE_USE %[[IN_VREG]]16 17source_filename = "test.ll"18target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"19 20define hidden i32 @main([0 x i32] %zero, [1 x i32] %one) local_unnamed_addr optdebug {21entry:22  notail call void (...) @bar([0 x i32] %zero)23  notail call void (...) @baz([1 x i32] %one)24  notail call void (...) @llvm.fake.use([0 x i32] %zero)25  notail call void (...) @llvm.fake.use([1 x i32] %one)26  ret i32 027}28 29declare void @bar([0 x i32] %a)30declare void @baz([1 x i32] %a)31