[all-commits] [llvm/llvm-project] 129267: [Flang][OpenMP] Add nsw flags to OMPIRBuilder loop...
Kaviya Rajendiran via All-commits
all-commits at lists.llvm.org
Sun Aug 9 23:41:14 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 129267e8fcfca0bc68509817f944eea6b6910ac5
https://github.com/llvm/llvm-project/commit/129267e8fcfca0bc68509817f944eea6b6910ac5
Author: Kaviya Rajendiran <67495422+kaviya2510 at users.noreply.github.com>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M flang/include/flang/Tools/CrossToolHelpers.h
M flang/lib/Frontend/FrontendActions.cpp
M flang/test/Integration/OpenMP/host-ir-flag.f90
A flang/test/Lower/OpenMP/integer-wrap-around.f90
M flang/tools/bbc/bbc.cpp
M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M mlir/include/mlir/Dialect/OpenMP/OpenMPAttrDefs.td
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
A mlir/test/Target/LLVMIR/openmp-integer-wrap-around.mlir
A mlir/test/Target/LLVMIR/openmp-nsw-collapsed.mlir
Log Message:
-----------
[Flang][OpenMP] Add nsw flags to OMPIRBuilder loop IV arithmetic (#214165)
- Extended the support of `-fno-wrapv` flag setting from frontend to the
OMPIRBuilder via `omp.integer_wrap_around` module attribute.
- When this attribute `omp.integer_wrap_around` is false (-fno-wrapv),
the OMPIRBuilder attaches `nsw` to all loop IV arithmetic.
- This enables SCEV to form proper `AddRec` expressions for the loop IV,
allowing `IndVarSimplify pass` to widen it from i32 to i64 and eliminate
the in-loop sext instruction which helps some backend optimizations and
also producing IR similar to Clang.
Fixes https://github.com/llvm/llvm-project/issues/213718
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