================
@@ -3613,13 +3613,15 @@ bool SparcTargetLowering::isFNegFree(EVT VT) const {
 
 bool SparcTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
                                        bool ForCodeSize) const {
+  bool CanLower = false;
   if (VT != MVT::f32 && VT != MVT::f64)
     return false;
-  if (Imm.isZero())
-    return Subtarget->isVIS();
-  if (Imm.isExactlyValue(+0.5) || Imm.isExactlyValue(-0.5))
-    return Subtarget->isVIS3();
-  return false;
+  if (Subtarget->isVIS())
+    CanLower = CanLower || Imm.isZero();
----------------
arsenm wrote:

```suggestion
  if (Subtarget->isVIS() mm.isZero())
    return true;
```

Did this mean to include -0?

https://github.com/llvm/llvm-project/pull/135718
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to