[Mlir-commits] [mlir] [mlir][Vector] Add a rewrite pattern for better low-precision bitcast… (PR #66387)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Sep 15 08:10:12 PDT 2023


================
@@ -155,6 +164,221 @@ struct ConvertVectorTransferRead final
 };
 } // end anonymous namespace
 
+//===----------------------------------------------------------------------===//
+// RewriteBitCastOfTruncI
+//===----------------------------------------------------------------------===//
+
+namespace {
+
+/// Helper struct to keep track of the provenance of a contiguous set of bits
+/// in a source vector.
+struct SourceElementRange {
+  int64_t sourceElement;
----------------
qcolombet wrote:

Please add a comment for `sourceElement`.
It wasn't immediately obvious to me that this was the index of the source element in the source vector. (If I understand correctly that is :P.)

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


More information about the Mlir-commits mailing list