[all-commits] [llvm/llvm-project] 0140ba: [clang] Enable FPContract with optnone (#91061)

Serge Pavlov via All-commits all-commits at lists.llvm.org
Mon May 6 00:31:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0140ba031c9b6a4028b36adb292fb37eb62f3dc0
      https://github.com/llvm/llvm-project/commit/0140ba031c9b6a4028b36adb292fb37eb62f3dc0
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/test/AST/ast-dump-fpfeatures.cpp
    M clang/test/AST/ast-dump-fpfeatures.m
    M clang/test/AST/ast-dump-late-parsing.cpp

  Log Message:
  -----------
  [clang] Enable FPContract with optnone (#91061)

Previously treatment of the attribute `optnone` was modified in
https://github.com/llvm/llvm-project/pull/85605 ([clang] Set correct
FPOptions if attribute 'optnone' presents). As a side effect FPContract
was disabled for optnone. It created unneeded divergence with the
behavior of -O0, which enables this optimization.

In the discussion
https://github.com/llvm/llvm-project/pull/85605#issuecomment-2089350379
it was pointed out that FP contraction should be enabled even if all
optimizations are turned off, otherwise results of calculations would be
different. This change enables FPContract at optnone.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list