[llvm] [RISCV][NFC] Fix comments in foldMemoryOperandImpl (PR #70033)

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 05:04:45 PDT 2023


https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/70033

I think the TODO is stale now.


>From 9c2ebed1ee955c6b087e218b4ad81dc9f741fcf3 Mon Sep 17 00:00:00 2001
From: wangpc <wangpengcheng.pp at bytedance.com>
Date: Tue, 24 Oct 2023 20:04:02 +0800
Subject: [PATCH] [RISCV][NFC] Fix comments in foldMemoryOperandImpl

I think the TODO is stale now.
---
 llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
index 36ca775c21058dc..e48d90f5be46b62 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
@@ -689,8 +689,7 @@ MachineInstr *RISCVInstrInfo::foldMemoryOperandImpl(
   if (MF.getDataLayout().isBigEndian())
     return nullptr;
 
-  // Fold load from stack followed by sext.w into lw.
-  // TODO: Fold with sext.b, sext.h, zext.b, zext.h, zext.w?
+  // Fold load from stack followed by sext.b/sext.h/sext.w/zext.b/zext.h/zext.w.
   if (Ops.size() != 1 || Ops[0] != 1)
    return nullptr;
 



More information about the llvm-commits mailing list