Hendrik =?utf-8?q?Hübner?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -1362,6 +1346,60 @@ mlir::LogicalResult
CIRToLLVMPtrStrideOpLowering::matchAndRewrite(
return mlir::success();
}
+static std::string getThreeWayCmpIntrinsicName(bool signedCmp,
+ unsigned operandWidth,
+ unsigned resultWidth) {
+ // The intrinsic's name takes the form:
+ // `llvm.<scmp|ucmp>.i<resultWidth>.i<operandWidth>`
+
+ std::string result = "llvm.";
+
+ if (signedCmp)
+ result.append("scmp.");
+ else
+ result.append("ucmp.");
+
+ // Result type part.
+ result.push_back('i');
+ result.append(std::to_string(resultWidth));
+ result.push_back('.');
+
+ // Operand type part.
+ result.push_back('i');
+ result.append(std::to_string(operandWidth));
+
+ return result;
+}
+
+mlir::LogicalResult CIRToLLVMCmpThreeWayOpLowering::matchAndRewrite(
----------------
bcardosolopes wrote:
I also see this in the incubator, it's a left over we should eliminate
https://github.com/llvm/llvm-project/pull/169963
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits