[flang-commits] [flang] 9bfe859 - [flang] Enable LoongArch for x86CompatibleBehavior in floating point flag

Weining Lu via flang-commits flang-commits at lists.llvm.org
Tue Feb 7 17:57:36 PST 2023


Author: Weining Lu
Date: 2023-02-08T09:56:48+08:00
New Revision: 9bfe859e6b46b88535c309e045d4ecb4e908072a

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

LOG: [flang] Enable LoongArch for x86CompatibleBehavior in floating point flag

Similar to D138503 for RISC-V which fix the flang-OldUnit test failure:

```
.../llvm-project/flang/unittests/Evaluate/real.cpp:504: FAIL:
FlagsToBits(prod.flags) == 0x18, not 0x10
0 0x800001 * 0xbf7ffffe
```

With this patch applied, `check-flang` all pass.

Reviewed By: vzakhari

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

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 4af442208ddca..44e82180dbce2 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__ || __riscv
+#if __x86_64__ || __riscv || __loongarch__
   bool x86CompatibleBehavior{true};
 #else
   bool x86CompatibleBehavior{false};


        


More information about the flang-commits mailing list