[llvm] 69ade08 - [RISCV][NFC] Fix comments in foldMemoryOperandImpl (#70033)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 20:13:47 PDT 2023


Author: Wang Pengcheng
Date: 2023-10-25T11:13:42+08:00
New Revision: 69ade08b4a1ade66e61b3f9f095553a71e452873

URL: https://github.com/llvm/llvm-project/commit/69ade08b4a1ade66e61b3f9f095553a71e452873
DIFF: https://github.com/llvm/llvm-project/commit/69ade08b4a1ade66e61b3f9f095553a71e452873.diff

LOG: [RISCV][NFC] Fix comments in foldMemoryOperandImpl (#70033)


I think the TODO is stale now.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Removed: 
    


################################################################################
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