[Openmp-commits] [clang] [openmp] [Clang][OpenMP] Fix tile/unroll on iterator- and foreach-loops. (PR #91459)

Michael Kruse via Openmp-commits openmp-commits at lists.llvm.org
Wed May 22 01:44:12 PDT 2024


================
@@ -156,9 +156,9 @@ extern "C" void body(...) {}
 // IR-EMPTY:
 // IR-NEXT:  [[FOR_INC]]:
 // IR-NEXT:    %[[TMP34:.+]] = load i32, ptr %[[DOTTILE_0_IV_I]], align 4
-// IR-NEXT:    %[[INC:.+]] = add nsw i32 %[[TMP34]], 1
+// IR-NEXT:    %[[INC:.+]] = add i32 %[[TMP34]], 1
----------------
Meinersbur wrote:

`nuw` would be an idea for a Clang extension in the footsteps of [vector extensions](https://releases.llvm.org/18.1.1/tools/clang/docs/LanguageExtensions.html#vectors-and-extended-vectors) or [`_ExtInt`](http://blog.llvm.org/2020/04/the-new-clang-extint-feature-provides.html) which also exposed a feature that LLVM always supported. E.g. 
```
typedef unsigned nowrap_unsigned_t __attribute__((ext_no_wrap));
for (nowrap_unsigned_t i = 0; i < n; ++i)
```
or
```
int [[clang::]]
```
However, the language consequences are immense.

https://github.com/llvm/llvm-project/pull/91459


More information about the Openmp-commits mailing list