Skip to content

Commit 669208d

Browse files
committed
Address code review comments
1 parent 3658e22 commit 669208d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ class ComplexExprEmitter : public StmtVisitor<ComplexExprEmitter, mlir::Value> {
7474
mlir::Value emitPromotedComplexOperand(const Expr *e, QualType promotionTy);
7575

7676
mlir::Value emitBinAdd(const BinOpInfo &op);
77-
7877
mlir::Value emitBinSub(const BinOpInfo &op);
7978

8079
QualType getPromotionType(QualType ty, bool isDivOpCode = false) {

clang/test/CIR/CodeGen/complex-arithmetic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ void foo4() {
173173

174174
// LLVM: %[[COMPLEX_A:.*]] = alloca { i32, i32 }, i64 1, align 4
175175
// LLVM: %[[COMPLEX_B:.*]] = alloca { i32, i32 }, i64 1, align 4
176+
// LLVM: %[[COMPLEX_C:.*]] = alloca { i32, i32 }, i64 1, align 4
176177
// LLVM: %[[TMP_A:.*]] = load { i32, i32 }, ptr %[[COMPLEX_A]], align 4
177178
// LLVM: %[[TMP_B:.*]] = load { i32, i32 }, ptr %[[COMPLEX_B]], align 4
178179
// LLVM: %[[A_REAL:.*]] = extractvalue { i32, i32 } %[[TMP_A]], 0
@@ -183,6 +184,7 @@ void foo4() {
183184
// LLVM: %[[SUB_IMAG:.*]] = sub i32 %[[A_IMAG]], %[[B_IMAG]]
184185
// LLVM: %[[RESULT:.*]] = insertvalue { i32, i32 } poison, i32 %[[SUB_REAL]], 0
185186
// LLVM: %[[RESULT_2:.*]] = insertvalue { i32, i32 } %[[RESULT]], i32 %[[SUB_IMAG]], 1
187+
// LLVM: store { i32, i32 } %[[RESULT_2]], ptr %[[COMPLEX_C]], align 4
186188

187189
// OGCG: %[[COMPLEX_A:.*]] = alloca { i32, i32 }, align 4
188190
// OGCG: %[[COMPLEX_B:.*]] = alloca { i32, i32 }, align 4

0 commit comments

Comments
 (0)