forked from OSchip/llvm-project
26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --prefix-filecheck-ir-name _
|
|
// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// CHECK-LABEL: define {{[^@]+}}@_Z3fooi
|
|
// CHECK-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
|
|
// CHECK-NEXT: [[_TMP0:%.*]] = alloca i32*, align 8
|
|
// CHECK-NEXT: [[_TMP1:%.*]] = alloca i32*, align 8
|
|
// CHECK-NEXT: [[REF_TMP:%.*]] = alloca i32, align 4
|
|
// CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
|
|
// CHECK-NEXT: store i32* [[A_ADDR]], i32** [[_TMP0]], align 8
|
|
// CHECK-NEXT: store i32 1, i32* [[REF_TMP]], align 4
|
|
// CHECK-NEXT: store i32* [[REF_TMP]], i32** [[_TMP1]], align 8
|
|
// CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
|
|
// CHECK-NEXT: [[TMP1:%.*]] = load i32*, i32** [[_TMP1]], align 8
|
|
// CHECK-NEXT: store i32 [[TMP0]], i32* [[TMP1]], align 4
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
void foo(int a) {
|
|
int &tmp0 = a;
|
|
int &&tmp1 = 1;
|
|
tmp1 = a;
|
|
return;
|
|
}
|