Skip to content

Commit 59ef384

Browse files
committed
Add TODO to explain the difference between CIR LLVM & OGCG
1 parent 8234508 commit 59ef384

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

clang/test/CIR/CodeGen/complex.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,9 @@ void complex_type_parameter(float _Complex a) {}
13171317
// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.complex<!cir.float>, !cir.ptr<!cir.complex<!cir.float>>, ["a", init]
13181318
// CIR: cir.store %{{.*}}, %[[A_ADDR]] : !cir.complex<!cir.float>, !cir.ptr<!cir.complex<!cir.float>>
13191319

1320+
// TODO(CIR): the difference between the CIR LLVM and OGCG is because the lack of calling convention lowering,
1321+
// Test will be updated when that is implemented
1322+
13201323
// LLVM: %[[A_ADDR:.*]] = alloca { float, float }, i64 1, align 4
13211324
// LLVM: store { float, float } %{{.*}}, ptr %[[A_ADDR]], align 4
13221325

@@ -1333,14 +1336,14 @@ void complex_type_argument() {
13331336
// CIR: %[[TMP_A:.*]] = cir.load{{.*}} %[[A_ADDR]] : !cir.ptr<!cir.complex<!cir.float>>, !cir.complex<!cir.float>
13341337
// CIR: cir.store{{.*}} %[[TMP_A]], %[[ARG_ADDR]] : !cir.complex<!cir.float>, !cir.ptr<!cir.complex<!cir.float>>
13351338
// CIR: %[[TMP_ARG:.*]] = cir.load{{.*}} %[[ARG_ADDR]] : !cir.ptr<!cir.complex<!cir.float>>, !cir.complex<!cir.float>
1336-
// CIR: cir.call @_Z5foo34Cf(%[[TMP_ARG]]) : (!cir.complex<!cir.float>) -> ()
1339+
// CIR: cir.call @_Z22complex_type_parameterCf(%[[TMP_ARG]]) : (!cir.complex<!cir.float>) -> ()
13371340

13381341
// LLVM: %[[A_ADDR:.*]] = alloca { float, float }, i64 1, align 4
13391342
// LLVM: %[[ARG_ADDR:.*]] = alloca { float, float }, i64 1, align 4
13401343
// LLVM: %[[TMP_A:.*]] = load { float, float }, ptr %[[A_ADDR]], align 4
13411344
// LLVM: store { float, float } %[[TMP_A]], ptr %[[ARG_ADDR]], align 4
13421345
// LLVM: %[[TMP_ARG:.*]] = load { float, float }, ptr %[[ARG_ADDR]], align 4
1343-
// LLVM: call void @_Z5foo34Cf({ float, float } %[[TMP_ARG]])
1346+
// LLVM: call void @_Z22complex_type_parameterCf({ float, float } %[[TMP_ARG]])
13441347

13451348
// OGCG: %[[A_ADDR:.*]] = alloca { float, float }, align 4
13461349
// OGCG: %[[ARG_ADDR:.*]] = alloca { float, float }, align 4
@@ -1353,4 +1356,4 @@ void complex_type_argument() {
13531356
// OGCG: store float %[[A_REAL]], ptr %[[ARG_REAL_PTR]], align 4
13541357
// OGCG: store float %[[A_IMAG]], ptr %[[ARG_IMAG_PTR]], align 4
13551358
// OGCG: %[[TMP_ARG:.*]] = load <2 x float>, ptr %[[ARG_ADDR]], align 4
1356-
// OGCG: call void @_Z5foo34Cf(<2 x float> noundef %[[TMP_ARG]])
1359+
// OGCG: call void @_Z22complex_type_parameterCf(<2 x float> noundef %[[TMP_ARG]])

0 commit comments

Comments
 (0)