[flang-commits] [flang] 1147e70 - [flang] Enable RISC-V for x86CompatibleBehavior in floating point flag

Qihan Cai via flang-commits flang-commits at lists.llvm.org
Tue Nov 29 02:15:26 PST 2022


Author: Qihan Cai
Date: 2022-11-29T21:15:19+11:00
New Revision: 1147e70e7ec18533e02b0bc1e77a9bf9d1f84ab8

URL: https://github.com/llvm/llvm-project/commit/1147e70e7ec18533e02b0bc1e77a9bf9d1f84ab8
DIFF: https://github.com/llvm/llvm-project/commit/1147e70e7ec18533e02b0bc1e77a9bf9d1f84ab8.diff

LOG: [flang] Enable RISC-V for x86CompatibleBehavior in floating point flag

Fixes #59132 by mitigating the behavior of not setting underflow flag on RISC-V platform.

Reviewed By: vzakhari

Differential Revision: https://reviews.llvm.org/D138503

Added: 
    

Modified: 
    flang/include/flang/Evaluate/target.h

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Evaluate/target.h b/flang/include/flang/Evaluate/target.h
index feb3ae55e0d45..4af442208ddca 100644
--- a/flang/include/flang/Evaluate/target.h
+++ b/flang/include/flang/Evaluate/target.h
@@ -25,7 +25,7 @@ struct Rounding {
   // (viz., fail to set the Underflow flag when an inexact product of a
   // multiplication is rounded up to a normal number from a subnormal
   // in some rounding modes)
-#if __x86_64__
+#if __x86_64__ || __riscv
   bool x86CompatibleBehavior{true};
 #else
   bool x86CompatibleBehavior{false};


        


More information about the flang-commits mailing list