| commit | c0fc5be60fd74babaf1a0b3dd3a44eeb9f3d73dc | [log] [tgz] |
|---|---|---|
| author | Kaviya Rajendiran <67495422+kaviya2510@users.noreply.github.com> | Fri Aug 29 11:48:24 2025 +0530 |
| committer | GitHub <noreply@github.com> | Fri Aug 29 11:48:24 2025 +0530 |
| tree | ef5d623e5748487e301e4ab82754404aa52ff1f7 | |
| parent | 7bf92f2827368d452bc979848bb7fb84bc6d449c [diff] |
[Flang][OpenMP] Fix to resolve the crash with SIMD aligned clause. (#150612) **Issue:** When SIMD aligned clause has a alignment value which is not a power of 2, compiler crashes with error Assertion (alignment & (alignment - 1)) == 0 && "alignment is not power of 2" **Fix:** According to LLVM Language Reference manual [[link]](https://llvm.org/docs/LangRef.html#assume-opbundles), the alignment value may be non-power-of-two. In that case, the pointer value must be a null pointer otherwise the behavior is undefined. So instead of emitting `llvm.assume` intrinsic function with a null pointer having the specified alignment, modified the implementation which ignores the aligned clause which has an alignment value which is not a power of 2. This patch also emits a warning indicating that the aligned clause is ignored if the alignment value is not a power of two. It fixes the issue https://github.com/llvm/llvm-project/issues/149458
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.