-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[AMDGPU] Add isAsCheapAsAMove
for v_pk_mov_b32
#127632
[AMDGPU] Add isAsCheapAsAMove
for v_pk_mov_b32
#127632
Conversation
@llvm/pr-subscribers-backend-amdgpu Author: Shilei Tian (shiltian) ChangesCredit: @arsenm Full diff: https://github.com/llvm/llvm-project/pull/127632.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
index 21898da1912f5..d5c6e8af109f4 100644
--- a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
@@ -1151,7 +1151,7 @@ let isCommutable = 1, isReMaterializable = 1 in {
defm V_PK_ADD_F32 : VOP3PInst<"v_pk_add_f32", VOP3P_Profile<VOP_V2F32_V2F32_V2F32, VOP3_PACKED>, any_fadd>;
} // End SubtargetPredicate = HasPackedFP32Ops
- let SubtargetPredicate = HasPkMovB32 in
+ let SubtargetPredicate = HasPkMovB32, isAsCheapAsAMove = 1 in
defm V_PK_MOV_B32 : VOP3PInst<"v_pk_mov_b32", VOP3P_Profile<VOP_V2I32_V2I32_V2I32, VOP3_PACKED>>;
} // End isCommutable = 1, isReMaterializable = 1
|
Best bet is likely a rematerialize test. e.g. add a case to remat-vop.mir that needs to handle v_pk_mov_b32. One in the coalescer might be better, like llvm/test/CodeGen/AMDGPU/vgpr-remat.mir |
1e3b907
to
95f6847
Compare
For some reason, Graphite can't retarget this PR. It is supposed to be on top of #127715. |
95f6847
to
4c23ee1
Compare
4c23ee1
to
85f3c4d
Compare
Co-authored-by: Matt Arsenault <[email protected]>
Co-authored-by: Matt Arsenault [email protected]