@@ -154,12 +154,10 @@ defm V_PK_MAXIMUM3_F16 : VOP3PInst<"v_pk_maximum3_f16", VOP3P_Profile<VOP_V2F16_
154
154
multiclass MadFmaMixPats<SDPatternOperator fma_like,
155
155
Instruction mix_inst,
156
156
Instruction mixlo_inst,
157
- Instruction mixhi_inst,
158
- bit HasFP32Denormals> {
157
+ Instruction mixhi_inst> {
159
158
// At least one of the operands needs to be an fpextend of an f16
160
159
// for this to be worthwhile, so we need three patterns here.
161
160
// TODO: Could we use a predicate to inspect src1/2/3 instead?
162
- let OtherPredicates = !if(HasFP32Denormals, [TruePredicate], [NoFP32Denormals]) in {
163
161
def : GCNPat <
164
162
(f32 (fma_like (f32 (VOP3PMadMixModsExt f16:$src0, i32:$src0_mods)),
165
163
(f32 (VOP3PMadMixMods f16:$src1, i32:$src1_mods)),
@@ -228,13 +226,12 @@ multiclass MadFmaMixPats<SDPatternOperator fma_like,
228
226
DSTCLAMP.NONE,
229
227
(i32 (IMPLICIT_DEF)))
230
228
>;
231
- } // End OtherPredicates
232
229
233
230
// FIXME: Special case handling for maxhi (especially for clamp)
234
231
// because dealing with the write to high half of the register is
235
232
// difficult.
236
233
foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
237
- let OtherPredicates = !if(HasFP32Denormals, [TruePredicate], [NoFP32Denormals]), True16Predicate = p in {
234
+ let True16Predicate = p in {
238
235
239
236
def : GCNPat <
240
237
(build_vector f16:$elt0, (f16 (fpround (fma_like (f32 (VOP3PMadMixMods f16:$src0, i32:$src0_modifiers)),
@@ -260,9 +257,9 @@ multiclass MadFmaMixPats<SDPatternOperator fma_like,
260
257
VGPR_32:$elt0))
261
258
>;
262
259
263
- } // end OtherPredicates
260
+ } // end True16Predicate
264
261
265
- let OtherPredicates = !if(HasFP32Denormals, [TruePredicate], [NoFP32Denormals]), True16Predicate = UseRealTrue16Insts in {
262
+ let True16Predicate = UseRealTrue16Insts in {
266
263
def : GCNPat <
267
264
(build_vector (f16 (fpround (fma_like (f32 (VOP3PMadMixMods f16:$src0, i32:$src0_modifiers)),
268
265
(f32 (VOP3PMadMixMods f16:$src1, i32:$src1_modifiers)),
@@ -297,7 +294,7 @@ multiclass MadFmaMixPats<SDPatternOperator fma_like,
297
294
DSTCLAMP.ENABLE,
298
295
(REG_SEQUENCE VGPR_32, $elt0, lo16, (f16 (IMPLICIT_DEF)), hi16)))
299
296
>;
300
- } // end OtherPredicates
297
+ } // end True16Predicate
301
298
}
302
299
303
300
class MinimumMaximumByMinimum3Maximum3VOP3P<SDPatternOperator node,
@@ -330,9 +327,9 @@ defm V_MAD_MIXHI_F16 : VOP3_VOP3PInst<"v_mad_mixhi_f16", VOP3P_Mix_Profile<VOP_F
330
327
}
331
328
} // End FPDPRounding = 1
332
329
}
333
- } // OtherPredicates = [NoFP32Denormals]
334
330
335
- defm : MadFmaMixPats<fmad, V_MAD_MIX_F32, V_MAD_MIXLO_F16, V_MAD_MIXHI_F16, 0 /*HasFP32Denormals*/>;
331
+ defm : MadFmaMixPats<fmad, V_MAD_MIX_F32, V_MAD_MIXLO_F16, V_MAD_MIXHI_F16>;
332
+ } // OtherPredicates = [NoFP32Denormals]
336
333
} // End SubtargetPredicate = HasMadMixInsts
337
334
338
335
@@ -353,7 +350,7 @@ defm V_FMA_MIXHI_F16 : VOP3_VOP3PInst<"v_fma_mixhi_f16", VOP3P_Mix_Profile<VOP_F
353
350
} // End FPDPRounding = 1
354
351
}
355
352
356
- defm : MadFmaMixPats<fma, V_FMA_MIX_F32, V_FMA_MIXLO_F16, V_FMA_MIXHI_F16, 1 /*HasPF32Denormals*/ >;
353
+ defm : MadFmaMixPats<fma, V_FMA_MIX_F32, V_FMA_MIXLO_F16, V_FMA_MIXHI_F16>;
357
354
}
358
355
359
356
// Defines patterns that extract signed 4bit from each Idx[0].
0 commit comments