Skip to content

Commit 1259ed6

Browse files
committed
Fixup
1 parent b99ca8f commit 1259ed6

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
227227
const mlir::Location loc = cgf.getLoc(e->getSourceRange());
228228
const mlir::Value vecValue = Visit(e->getBase());
229229
const mlir::Value indexValue = Visit(e->getIdx());
230-
return cgf.cir::VecExtractOp::create(builder, loc, vecValue, indexValue);
230+
return VecExtractOp::create(cgf.cir.builder, loc, vecValue, indexValue);
231231
}
232232
// Just load the lvalue formed by the subscript expression.
233233
return emitLoadOfLValue(e);
@@ -238,8 +238,8 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
238238
// The undocumented form of __builtin_shufflevector.
239239
mlir::Value inputVec = Visit(e->getExpr(0));
240240
mlir::Value indexVec = Visit(e->getExpr(1));
241-
return cgf.cir::VecShuffleDynamicOp::create(
242-
builder, cgf.getLoc(e->getSourceRange()), inputVec, indexVec);
241+
return VecShuffleDynamicOp::create(
242+
cgf.cir.builder, cgf.getLoc(e->getSourceRange()), inputVec, indexVec);
243243
}
244244

245245
mlir::Value vec1 = Visit(e->getExpr(0));
@@ -257,9 +257,10 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
257257
.getSExtValue()));
258258
}
259259

260-
return cgf.cir::VecShuffleOp::create(
261-
builder, cgf.getLoc(e->getSourceRange()), cgf.convertType(e->getType()),
262-
vec1, vec2, cgf.builder.getArrayAttr(indices));
260+
return VecShuffleOp::create(cgf.cir.builder,
261+
cgf.getLoc(e->getSourceRange()),
262+
cgf.convertType(e->getType()), vec1, vec2,
263+
cgf.builder.getArrayAttr(indices));
263264
}
264265

265266
mlir::Value VisitConvertVectorExpr(ConvertVectorExpr *e) {

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,14 +2428,14 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite(
24282428
mlir::Type complexElemTy =
24292429
getTypeConverter()->convertType(complexType.getElementType());
24302430

2431-
auto lhsReal = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
2432-
complexElemTy, lhs, 0);
2433-
auto lhsImag = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
2434-
complexElemTy, lhs, 1);
2435-
auto rhsReal = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
2436-
complexElemTy, rhs, 0);
2437-
auto rhsImag = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
2438-
complexElemTy, rhs, 1);
2431+
auto lhsReal = mlir::LLVM::ExtractValueOp::create(
2432+
rewriter, loc, complexElemTy, lhs, int64_t{0});
2433+
auto lhsImag = mlir::LLVM::ExtractValueOp::create(
2434+
rewriter, loc, complexElemTy, lhs, int64_t{1});
2435+
auto rhsReal = mlir::LLVM::ExtractValueOp::create(
2436+
rewriter, loc, complexElemTy, rhs, int64_t{0});
2437+
auto rhsImag = mlir::LLVM::ExtractValueOp::create(
2438+
rewriter, loc, complexElemTy, rhs, int64_t{1});
24392439

24402440
if (cmpOp.getKind() == cir::CmpOpKind::eq) {
24412441
if (complexElemTy.isInteger()) {

0 commit comments

Comments
 (0)