-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[X86][AMX] Fix a bug after #83628 #91207
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We need to check if `GR64Cand` a valid register before using it. Test is not needed since it's covered in llvm-test-suite. Fixes llvm#90954
|
@llvm/pr-subscribers-backend-x86 Author: Phoebe Wang (phoebewang) ChangesWe need to check if Test is not needed since it's covered in llvm-test-suite. Fixes #90954 Full diff: https://github.com/llvm/llvm-project/pull/91207.diff 1 Files Affected:
diff --git a/llvm/lib/Target/X86/X86LowerTileCopy.cpp b/llvm/lib/Target/X86/X86LowerTileCopy.cpp
index fd05e16ac1ceff..60c024556ff13f 100644
--- a/llvm/lib/Target/X86/X86LowerTileCopy.cpp
+++ b/llvm/lib/Target/X86/X86LowerTileCopy.cpp
@@ -146,7 +146,7 @@ bool X86LowerTileCopy::runOnMachineFunction(MachineFunction &MF) {
addFrameReference(BuildMI(MBB, MI, DL, TII->get(Opc)), TileSS)
.addReg(SrcReg, getKillRegState(SrcMO.isKill()));
MachineOperand &MO = NewMI->getOperand(2);
- MO.setReg(GR64Cand);
+ MO.setReg(GR64Cand ? GR64Cand : X86::RAX);
MO.setIsKill(true);
// tileloadd (%sp, %idx), %tmm
Opc = GET_EGPR_IF_ENABLED(X86::TILELOADD);
@@ -157,7 +157,7 @@ bool X86LowerTileCopy::runOnMachineFunction(MachineFunction &MF) {
// restore %rax
// mov (%sp) %rax
addFrameReference(
- BuildMI(MBB, MI, DL, TII->get(X86::MOV64rm), GR64Cand), StrideSS);
+ BuildMI(MBB, MI, DL, TII->get(X86::MOV64rm), X86::RAX), StrideSS);
}
MI.eraseFromParent();
Changed = true;
|
|
Ping? |
RKSimon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a fix, would be nice to get a crash test added though if you can.
Done. The LLVM bugpoint cannot work for AMX tests, finally reduced it with the help of #92280. |
Found this problem when investigating llvm#91207
) Found this problem when investigating #91207
…m#92384) Found this problem when investigating llvm#91207
…m#92384) Found this problem when investigating llvm#91207
We need to check if
GR64Canda valid register before using it.Test is not needed since it's covered in llvm-test-suite.
Fixes #90954