File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -3613,15 +3613,14 @@ bool SparcTargetLowering::isFNegFree(EVT VT) const {
36133613
36143614bool SparcTargetLowering::isFPImmLegal (const APFloat &Imm, EVT VT,
36153615 bool ForCodeSize) const {
3616- bool CanLower = false ;
36173616 if (VT != MVT::f32 && VT != MVT::f64 )
36183617 return false ;
3619- if (Subtarget->isVIS ())
3620- CanLower = CanLower || Imm. isZero () ;
3618+ if (Subtarget->isVIS () && Imm. isZero () )
3619+ return true ;
36213620 if (Subtarget->isVIS3 ())
3622- CanLower =
3623- CanLower || ( Imm.isExactlyValue (+ 0.5 ) || Imm. isExactlyValue (- 0.5 )) ;
3624- return CanLower ;
3621+ return Imm. isExactlyValue (+ 0.5 ) || Imm. isExactlyValue (- 0.5 ) ||
3622+ Imm.getExactLog2Abs () == - 1 ;
3623+ return false ;
36253624}
36263625
36273626bool SparcTargetLowering::isCtlzFast () const { return Subtarget->isVIS3 (); }
You can’t perform that action at this time.
0 commit comments