brintos

brintos / llvm-project-archived public Read only

0
0
Text · 820 B · 29f72aa Raw
21 lines · c
1// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -fextend-variable-liveness %s -o - | FileCheck %s2//3// We are checking that the fake.use calls for i, j and k appear4// in a particular order. It is not the order itself that is important5// but that it remains the same between different test runs.6 7// CHECK:      [[K_FAKE_USE:%[a-zA-Z0-9\.]+]] = load i32, ptr %k.addr8// CHECK-NEXT: call void (...) @llvm.fake.use(i32 [[K_FAKE_USE]])9// CHECK-NEXT: [[J_FAKE_USE:%[a-zA-Z0-9\.]+]] = load i32, ptr %j.addr10// CHECK-NEXT: call void (...) @llvm.fake.use(i32 [[J_FAKE_USE]])11// CHECK-NEXT: [[I_FAKE_USE:%[a-zA-Z0-9\.]+]] = load i32, ptr %i.addr12// CHECK-NEXT: call void (...) @llvm.fake.use(i32 [[I_FAKE_USE]])13 14void bar();15void foo(int i, int j, int k)16{17   for (int l = 0; l < i; l++) {18      bar();19   }20}21