[llvm] [RISCV] Match prefetch address with offset (PR #66072)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 21:02:33 PDT 2023
================
@@ -2443,6 +2449,78 @@ bool RISCVDAGToDAGISel::SelectAddrRegImm(SDValue Addr, SDValue &Base,
return true;
}
+/// Similar to SelectAddrRegImm, except that the least significant 5 bits of
+/// Offset shoule be all zeros.
+bool RISCVDAGToDAGISel::SelectAddrRegImmLsb00000(SDValue Addr, SDValue &Base,
+ SDValue &Offset) {
+ if (SelectAddrFrameIndex(Addr, Base, Offset))
+ return true;
+
+ SDLoc DL(Addr);
+ MVT VT = Addr.getSimpleValueType();
+
+ if (Addr.getOpcode() == RISCVISD::ADD_LO) {
+ Base = Addr;
----------------
topperc wrote:
This is the default behavior. Why do we need this `if` at all?
https://github.com/llvm/llvm-project/pull/66072
More information about the llvm-commits
mailing list