@@ -282,10 +282,11 @@ static LegalityPredicate elementTypeIsLegal(unsigned TypeIdx) {
282282static const LLT S1 = LLT::scalar(1 );
283283static const LLT S8 = LLT::scalar(8 );
284284static const LLT S16 = LLT::scalar(16 );
285+ static const LLT F16 = LLT::integer(16 );
285286static const LLT S32 = LLT::scalar(32 );
286- static const LLT F32 = LLT::float32( );
287+ static const LLT F32 = LLT::integer( 32 );
287288static const LLT S64 = LLT::scalar(64 );
288- static const LLT F64 = LLT::float64( );
289+ static const LLT F64 = LLT::integer( 64 );
289290static const LLT S96 = LLT::scalar(96 );
290291static const LLT S128 = LLT::scalar(128 );
291292static const LLT S160 = LLT::scalar(160 );
@@ -305,7 +306,7 @@ static const LLT V10S16 = LLT::fixed_vector(10, 16);
305306static const LLT V12S16 = LLT::fixed_vector(12 , 16 );
306307static const LLT V16S16 = LLT::fixed_vector(16 , 16 );
307308
308- static const LLT V2F16 = LLT::fixed_vector(2 , LLT::float16( ));
309+ static const LLT V2F16 = LLT::fixed_vector(2 , LLT::integer( 16 ));
309310static const LLT V2BF16 = V2F16; // FIXME
310311
311312static const LLT V2S32 = LLT::fixed_vector(2 , 32 );
@@ -3198,10 +3199,10 @@ bool AMDGPULegalizerInfo::legalizeFMad(
31983199
31993200 // TODO: Always legal with future ftz flag.
32003201 // FIXME: Do we need just output?
3201- if (Ty == LLT::float32 () &&
3202+ if (Ty == F32 &&
32023203 MFI->getMode ().FP32Denormals == DenormalMode::getPreserveSign ())
32033204 return true ;
3204- if (Ty == LLT::float16 () &&
3205+ if (Ty == F16 &&
32053206 MFI->getMode ().FP64FP16Denormals == DenormalMode::getPreserveSign ())
32063207 return true ;
32073208
@@ -3753,8 +3754,6 @@ bool AMDGPULegalizerInfo::legalizeFPow(MachineInstr &MI,
37533754 Register Src1 = MI.getOperand (2 ).getReg ();
37543755 unsigned Flags = MI.getFlags ();
37553756 LLT Ty = B.getMRI ()->getType (Dst);
3756- const LLT F16 = LLT::float16 ();
3757- const LLT F32 = LLT::float32 ();
37583757
37593758 if (Ty == F32) {
37603759 auto Log = B.buildFLog2 (F32, Src0, Flags);
@@ -3797,7 +3796,6 @@ bool AMDGPULegalizerInfo::legalizeFFloor(MachineInstr &MI,
37973796 MachineIRBuilder &B) const {
37983797
37993798 const LLT S1 = LLT::scalar (1 );
3800- const LLT F64 = LLT::float64 ();
38013799 Register Dst = MI.getOperand (0 ).getReg ();
38023800 Register OrigSrc = MI.getOperand (1 ).getReg ();
38033801 unsigned Flags = MI.getFlags ();
0 commit comments