From 9bfe859e6b46b88535c309e045d4ecb4e908072a Mon Sep 17 00:00:00 2001 From: Weining Lu Date: Wed, 8 Feb 2023 09:07:34 +0800 Subject: [PATCH] [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 --- flang/include/flang/Evaluate/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/include/flang/Evaluate/target.h b/flang/include/flang/Evaluate/target.h index 4af4422..44e8218 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}; -- 2.7.4