================
@@ -4044,6 +4044,37 @@ def CIR_ExpectOp : CIR_Op<"expect", [
}];
}
+//===----------------------------------------------------------------------===//
+// PtrDiffOp
+//===----------------------------------------------------------------------===//
+
+def CIR_PtrDiffOp : CIR_Op<"ptr_diff", [Pure, SameTypeOperands]> {
+ let summary = "Pointer subtraction arithmetic";
+ let description = [{
+ The cir.ptr_diff operation computes the difference between two pointers
that
+ have the same element type
+
+ The result reflects the ABI-defined size of the pointed-to type. For
example,
+ subtracting two !cir.ptr<!u64i> values may yield 1, representing an 8-byte
----------------
kimsh02 wrote:
Okay, I think I'm starting to understand things more. So, thats why we
have`cir::MissingFeatures::llvmLoweringPtrDiffConsidersPointee`.
https://github.com/llvm/llvm-project/pull/163306
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits