Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

release/21.x: [RISCV] Remove incorrect and untested FrameIndex support from SelectAddrRegImm9. (#148779)#148913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tru merged 1 commit intollvm:release/21.xfromllvmbot:issue148779
Jul 17, 2025

Conversation

llvmbot
Copy link
Member

Backport63d099a

Requested by:@topperc

@llvmbot
Copy link
MemberAuthor

@lenary What do you think about merging this PR to the release branch?

@llvmbot
Copy link
MemberAuthor

@llvm/pr-subscribers-backend-risc-v

Author: None (llvmbot)

Changes

Backport63d099a

Requested by: @topperc


Full diff:https://github.com/llvm/llvm-project/pull/148913.diff

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp (+4-4)
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cppindex 666c76b21e631..880e6b0d48892 100644--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp@@ -2936,8 +2936,8 @@ bool RISCVDAGToDAGISel::SelectAddrRegImm(SDValue Addr, SDValue &Base, /// Similar to SelectAddrRegImm, except that the offset is restricted to uimm9. bool RISCVDAGToDAGISel::SelectAddrRegImm9(SDValue Addr, SDValue &Base,                                           SDValue &Offset) {-  if (SelectAddrFrameIndex(Addr, Base, Offset))-    return true;+  // FIXME: Support FrameIndex. Need to teach eliminateFrameIndex that only+  // a 9-bit immediate can be folded.    SDLoc DL(Addr);   MVT VT = Addr.getSimpleValueType();@@ -2947,8 +2947,8 @@ bool RISCVDAGToDAGISel::SelectAddrRegImm9(SDValue Addr, SDValue &Base,     if (isUInt<9>(CVal)) {       Base = Addr.getOperand(0);-      if (auto *FIN = dyn_cast<FrameIndexSDNode>(Base))-        Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), VT);+      // FIXME: Support FrameIndex. Need to teach eliminateFrameIndex that only+      // a 9-bit immediate can be folded.       Offset = CurDAG->getSignedTargetConstant(CVal, DL, VT);       return true;     }

@nikicnikic moved this fromNeeds Triage toNeeds Review inLLVM Release StatusJul 15, 2025
Copy link
Member

@lenarylenary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

@github-project-automationgithub-project-automationbot moved this fromNeeds Review toNeeds Merge inLLVM Release StatusJul 15, 2025
…ddrRegImm9. (llvm#148779)To fold a FrameIndex, we need to teach eliminateFrameIndex to respectthe uimm9 range.(cherry picked from commit63d099a)
@trutru merged commit49722f1 intollvm:release/21.xJul 17, 2025
@github-project-automationgithub-project-automationbot moved this fromNeeds Merge toDone inLLVM Release StatusJul 17, 2025
@github-actionsGitHub Actions
Copy link

@topperc (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lenarylenarylenary approved these changes

Assignees
No one assigned
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants
@llvmbot@lenary@tru@topperc

[8]ページ先頭

©2009-2025 Movatter.jp