[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-30 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff closed https://github.com/llvm/llvm-project/pull/73770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-30 Thread Serge Pavlov via cfe-commits
@@ -4623,10 +4623,12 @@ struct IncDecSubobjectHandler { if (Old) *Old = APValue(Value); APFloat One(Value.getSemantics(), 1); +llvm::RoundingMode RM = +E->getFPFeaturesInEffect(Info.Ctx.getLangOpts()).getRoundingMode(); spavloff wrote: Yes

[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-30 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/73770 >From 48ed25acfa5765af607efce2309605b96a09d477 Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Wed, 29 Nov 2023 00:53:54 +0700 Subject: [PATCH 1/2] [clang] Use current rounding mode for float inc/dec Incremen

[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-29 Thread Timm Baeder via cfe-commits
@@ -4623,10 +4623,12 @@ struct IncDecSubobjectHandler { if (Old) *Old = APValue(Value); APFloat One(Value.getSemantics(), 1); +llvm::RoundingMode RM = +E->getFPFeaturesInEffect(Info.Ctx.getLangOpts()).getRoundingMode(); tbaederr wrote: Sho

[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes Increment and decrement are equivalent to adding or subtracting 1. For the floating-point values these operations depend on the current rounding mode. Teach constant evaluator to perform ++ and -- according

[clang] [clang] Use current rounding mode for float inc/dec (PR #73770)

2023-11-29 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/73770 Increment and decrement are equivalent to adding or subtracting 1. For the floating-point values these operations depend on the current rounding mode. Teach constant evaluator to perform ++ and -- according to