[llvm] 9286665 - AMDGPU: Use OtherPredicates for v_dot2_bf16_bf16(f16_f16) pseudo (#84354)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 11:43:38 PST 2024


Author: Changpeng Fang
Date: 2024-03-07T11:43:33-08:00
New Revision: 9286665f7667a00062ef7bb8d1eec0fa02d2602c

URL: https://github.com/llvm/llvm-project/commit/9286665f7667a00062ef7bb8d1eec0fa02d2602c
DIFF: https://github.com/llvm/llvm-project/commit/9286665f7667a00062ef7bb8d1eec0fa02d2602c.diff

LOG: AMDGPU: Use OtherPredicates for v_dot2_bf16_bf16(f16_f16) pseudo (#84354)

This is because SubtargetPredicate is not copied from pseudo to dpp16
and dpp8 real. Actually this is the common issue for insts with
_Realtriple_ --- We should avoid using SubtargetPredicate to define
pseudo: the predicate will be lost in real.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/VOP3Instructions.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/VOP3Instructions.td b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
index 334cfad478f151..3340ded9d36000 100644
--- a/llvm/lib/Target/AMDGPU/VOP3Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
@@ -893,7 +893,7 @@ let SubtargetPredicate = isGFX12Plus, ReadsModeReg = 0 in {
   defm V_MINIMUMMAXIMUM_F16 : VOP3Inst<"v_minimummaximum_f16", VOP3_Profile<VOP_F16_F16_F16_F16, VOP3_OPSEL>>;
 } // End SubtargetPredicate = isGFX12Plus, ReadsModeReg = 0
 
-let SubtargetPredicate = HasDot9Insts, IsDOT=1 in {
+let OtherPredicates = [HasDot9Insts], IsDOT=1 in {
   defm V_DOT2_F16_F16 :   VOP3Inst<"v_dot2_f16_f16",   VOP3_DOT_Profile<VOP_F16_V2F16_V2F16_F16>, int_amdgcn_fdot2_f16_f16>;
   defm V_DOT2_BF16_BF16 : VOP3Inst<"v_dot2_bf16_bf16", VOP3_DOT_Profile<VOP_BF16_V2BF16_V2BF16_BF16>, int_amdgcn_fdot2_bf16_bf16>;
 }


        


More information about the llvm-commits mailing list