[all-commits] [llvm/llvm-project] 526553: [flang] Add nsw flag to do-variable increment with...

Yusuke MINATO via All-commits all-commits at lists.llvm.org
Wed May 15 21:22:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 526553b25131a69d9d6426e17c7b69c2ba27144f
      https://github.com/llvm/llvm-project/commit/526553b25131a69d9d6426e17c7b69c2ba27144f
  Author: Yusuke MINATO <minato.yusuke at fujitsu.com>
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/include/flang/Lower/LoweringOptions.def
    M flang/include/flang/Optimizer/Transforms/Passes.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/include/flang/Tools/CLOptions.inc
    M flang/include/flang/Tools/CrossToolHelpers.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/IO.cpp
    M flang/lib/Optimizer/Transforms/ControlFlowConverter.cpp
    M flang/test/Driver/frontend-forwarding.f90
    M flang/test/Fir/loop01.fir
    M flang/test/Lower/array-substring.f90
    M flang/test/Lower/do_loop.f90
    M flang/test/Lower/do_loop_unstructured.f90
    M flang/test/Lower/infinite_loop.f90
    M flang/test/Lower/io-implied-do-fixes.f90
    M flang/tools/bbc/bbc.cpp

  Log Message:
  -----------
  [flang] Add nsw flag to do-variable increment with a new option (#91579)

This patch adds nsw flag to the increment of do-variables when a new
option is enabled.
NOTE 11.10 in the Fortran 2018 standard says they never overflow.

See also the discussion in #74709 and the following discourse post.
https://discourse.llvm.org/t/rfc-add-nsw-flags-to-arithmetic-integer-operations-using-the-option-fno-wrapv/77584/5



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