[clang] [clang][CIR][mlir] Migrate to free create functions. NFC. (PR #164656)

Maksim Levental via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 22 09:36:25 PDT 2025


================
@@ -2428,14 +2428,14 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite(
     mlir::Type complexElemTy =
         getTypeConverter()->convertType(complexType.getElementType());
 
-    auto lhsReal = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
-                                                      complexElemTy, lhs, 0);
-    auto lhsImag = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
-                                                      complexElemTy, lhs, 1);
-    auto rhsReal = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
-                                                      complexElemTy, rhs, 0);
-    auto rhsImag = mlir::LLVM::ExtractValueOp::create(rewriter, loc,
-                                                      complexElemTy, rhs, 1);
+    auto lhsReal = mlir::LLVM::ExtractValueOp::create(
+        rewriter, loc, complexElemTy, lhs, int64_t{0});
----------------
makslevental wrote:

i don't think this is gonna work - i had to pull these out of the actual calls to get the coercion (to nullptr) to not happen

https://github.com/llvm/llvm-project/pull/164656


More information about the cfe-commits mailing list