[llvm] 9ee3f16 - [SystemZ] Return true from hasBitPreservingFPLogic().

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 09:54:48 PDT 2021


Author: Jonas Paulsson
Date: 2021-06-01T11:52:50-05:00
New Revision: 9ee3f16919acb753d011290446efd12bc59d9605

URL: https://github.com/llvm/llvm-project/commit/9ee3f16919acb753d011290446efd12bc59d9605
DIFF: https://github.com/llvm/llvm-project/commit/9ee3f16919acb753d011290446efd12bc59d9605.diff

LOG: [SystemZ] Return true from hasBitPreservingFPLogic().

This is currently NFC on benchmarks and tests.

Review: Ulrich Weigand

Added: 
    

Modified: 
    llvm/lib/Target/SystemZ/SystemZISelLowering.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.h b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
index e6850a5ec0a56..d49e48f676aba 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.h
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
@@ -433,6 +433,10 @@ class SystemZTargetLowering : public TargetLowering {
   }
   bool isCheapToSpeculateCtlz() const override { return true; }
   bool preferZeroCompareBranch() const override { return true; }
+  bool hasBitPreservingFPLogic(EVT VT) const override {
+    EVT ScVT = VT.getScalarType();
+    return ScVT == MVT::f32 || ScVT == MVT::f64 || ScVT == MVT::f128;
+  }
   EVT getSetCCResultType(const DataLayout &DL, LLVMContext &,
                          EVT) const override;
   bool isFMAFasterThanFMulAndFAdd(const MachineFunction &MF,


        


More information about the llvm-commits mailing list