Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ static void lowerArrayDtorCtorIntoLoop(CIRBaseBuilderTy &builder,
[&](mlir::OpBuilder &b, mlir::Location loc) {
auto currentElement = b.create<cir::LoadOp>(loc, eltTy, tmpAddr);
mlir::Type boolTy = cir::BoolType::get(b.getContext());
auto cmp = builder.create<cir::CmpOp>(loc, boolTy, cir::CmpOpKind::eq,
auto cmp = builder.create<cir::CmpOp>(loc, boolTy, cir::CmpOpKind::ne,
currentElement, end);
builder.createCondition(cmp);
},
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/CodeGen/array-init-destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void x() {
// AFTER: cir.yield
// AFTER: } while {
// AFTER: %[[ArrayElt:.*]] = cir.load %[[TmpIdx]] : !cir.ptr<!cir.ptr<!rec_xpto>>, !cir.ptr<!rec_xpto>
// AFTER: %[[ExitCond:.*]] = cir.cmp(eq, %[[ArrayElt]], %[[ArrayPastEnd]]) : !cir.ptr<!rec_xpto>, !cir.bool
// AFTER: %[[ExitCond:.*]] = cir.cmp(ne, %[[ArrayElt]], %[[ArrayPastEnd]]) : !cir.ptr<!rec_xpto>, !cir.bool
// AFTER: cir.condition(%[[ExitCond]])
// AFTER: }

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/CodeGen/array-new-init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ void t_new_constant_size_constructor() {
// AFTER: cir.yield
// AFTER: } while {
// AFTER: %[[CUR_ELEM_PTR2:.*]] = cir.load %[[CUR_ELEM_ALLOCA]] : !cir.ptr<!cir.ptr<!rec_E>>, !cir.ptr<!rec_E>
// AFTER: %[[END_TEST:.*]] = cir.cmp(eq, %[[CUR_ELEM_PTR2]], %[[END_PTR]]) : !cir.ptr<!rec_E>, !cir.bool
// AFTER: %[[END_TEST:.*]] = cir.cmp(ne, %[[CUR_ELEM_PTR2]], %[[END_PTR]]) : !cir.ptr<!rec_E>, !cir.bool
// AFTER: cir.condition(%[[END_TEST]])
// AFTER: }
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void t_new_constant_size_constructor() {
// LLVM: br label %[[INIT_ELEM_BB:.*]]
// LLVM: [[LOOP_INC_BB:.*]]:
// LLVM: %[[NEXT_ELEM_PTR:.*]] = load ptr
// LLVM: %[[END_TEST:.*]] = icmp eq ptr %[[NEXT_ELEM_PTR]], %[[END_PTR]]
// LLVM: %[[END_TEST:.*]] = icmp ne ptr %[[NEXT_ELEM_PTR]], %[[END_PTR]]
// LLVM: br i1 %[[END_TEST]], label %[[INIT_ELEM_BB]], label %[[EXIT_BB:.*]]
// LLVM: [[INIT_ELEM_BB]]:
// LLVM: %[[CUR_ELEM_PTR:.*]] = load ptr
Expand Down
Loading