[Mlir-commits] [llvm] [mlir] NfC fix comment in #119039 (PR #119727)
Nirvedh Meshram
llvmlistbot at llvm.org
Thu Dec 12 09:33:05 PST 2024
https://github.com/nirvedhmeshram updated https://github.com/llvm/llvm-project/pull/119727
>From 9190e65fb4fced2a5c303d60538fa26a546cddff Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Thu, 12 Dec 2024 08:49:26 -0800
Subject: [PATCH 1/2] [RISCV] Remove unused SDNodeXForm from RISCVGISel.td. NFC
Leftover from when we tried to make i32 legal.
---
llvm/lib/Target/RISCV/RISCVGISel.td | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/llvm/lib/Target/RISCV/RISCVGISel.td b/llvm/lib/Target/RISCV/RISCVGISel.td
index 7cb419b610e603..f9c17cf5eed5dd 100644
--- a/llvm/lib/Target/RISCV/RISCVGISel.td
+++ b/llvm/lib/Target/RISCV/RISCVGISel.td
@@ -58,15 +58,6 @@ def GIAddrRegImm :
def GIVLOp : GIComplexOperandMatcher<s32, "renderVLOp">,
GIComplexPatternEquiv<VLOp>;
-// Convert from i32 immediate to i64 target immediate to make SelectionDAG type
-// checking happy so we can use ADDIW which expects an XLen immediate.
-def as_i64imm : SDNodeXForm<imm, [{
- return CurDAG->getTargetConstant(N->getSExtValue(), SDLoc(N), MVT::i64);
-}]>;
-
-def gi_as_i64imm : GICustomOperandRenderer<"renderImm">,
- GISDNodeXFormEquiv<as_i64imm>;
-
def gi_trailing_zero : GICustomOperandRenderer<"renderTrailingZeros">,
GISDNodeXFormEquiv<TrailingZeros>;
>From 9a2035593912444296cae4784632f6a59490f2c5 Mon Sep 17 00:00:00 2001
From: Nirvedh <nirvedh at gmail.com>
Date: Thu, 12 Dec 2024 11:26:07 -0600
Subject: [PATCH 2/2] [NFC] fix clang-format in 119039
---
mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp b/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
index 3caf93b1408df4..6e63cf068bce57 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
@@ -822,7 +822,13 @@ FailureOr<TilingResult> tensor::bubbleUpPadSlice(OpBuilder &b,
// the source tensor. (Similar to newOffset.)
// srcSize - newOffset represents how much length we have available
// and length - newLow represents how much length we want at most.
- // Note that there are many ways to order this indexing math to compute newLength, but we want to make sure that the final affine.min ops in the sequence are bounding the index to as small a value as possible. If ValueBoundsOpInterface is used, this calcuation will get upper bounds from the affine.min ops, so we want to use the smallest known value to set the bound at the end of the computation sequence. In this case, the index will be upper bounded by length - newLow.
+ // Note that there are many ways to order this indexing math to compute
+ // newLength, but we want to make sure that the final affine.min ops in the
+ // sequence are bounding the index to as small a value as possible. If
+ // ValueBoundsOpInterface is used, this calcuation will get upper bounds
+ // from the affine.min ops, so we want to use the smallest known value to
+ // set the bound at the end of the computation sequence. In this case, the
+ // index will be upper bounded by length - newLow.
OpFoldResult newLength = min(sub(srcSize, newOffset), sub(length, newLow));
// Optimization: If low = 0, then newLow = 0. then newLength >= 0 assuming
// length >= 0.
More information about the Mlir-commits
mailing list