alexfh wrote:
There's one more questionable effect of this commit (together with the fix in
#89567). Some of our code started triggering "loop not unrolled" warnings. A
reduced example is at https://godbolt.org/z/jG4xsGY7s
```
#include
#include
template
int FailToBuild(int n) {
constexpr
yronglin wrote:
> There's one more questionable effect of this commit (together with the fix in
> #89567). Some of our code started triggering "loop not unrolled" warnings. A
> reduced example is at https://godbolt.org/z/jG4xsGY7s
>
> ```
> #include
> #include
>
> template
> int FailToBuil
yronglin wrote:
Sorry, I didn't find this problem last time I reviewed
https://github.com/llvm/llvm-project/pull/89567. @alexfh Seems this issue
introduced by https://github.com/llvm/llvm-project/pull/89567, I've a PR to fix
it https://github.com/llvm/llvm-project/pull/90240.
https://github.
yronglin wrote:
@alexfh fixed.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yronglin created
https://github.com/llvm/llvm-project/pull/88666
Fixes https://github.com/llvm/llvm-project/issues/88624
GCC allows the value of loop unroll count to be zero, and the values of 0 and 1
block any unrolling of the loop. This PR aims to make clang keeps the same
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (yronglin)
Changes
Fixes https://github.com/llvm/llvm-project/issues/88624
GCC allows the value of loop unroll count to be zero, and the values of 0 and 1
block any unrolling of the loop. This PR aims to make clang keeps the same
be
https://github.com/yronglin edited
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/88666
>From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001
From: yronglin
Date: Mon, 15 Apr 2024 00:36:06 +0800
Subject: [PATCH] [Clang] Allow the value of unroll count to be zero in
'#pragma GCC
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/88666
>From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001
From: yronglin
Date: Mon, 15 Apr 2024 00:36:06 +0800
Subject: [PATCH 1/2] [Clang] Allow the value of unroll count to be zero in
'#pragma
Endilll wrote:
`Sema.h` changes look good.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -423,6 +423,10 @@ Bug Fixes in This Version
- Fixed a regression in CTAD that a friend declaration that befriends itself
may cause
incorrect constraint substitution. (#GH86769).
+- Clang now allowed the value of unroll count to be zero in ``#pragma GCC
unroll`` and ``#p
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/88666
>From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001
From: yronglin
Date: Mon, 15 Apr 2024 00:36:06 +0800
Subject: [PATCH 1/3] [Clang] Allow the value of unroll count to be zero in
'#pragma
@@ -423,6 +423,10 @@ Bug Fixes in This Version
- Fixed a regression in CTAD that a friend declaration that befriends itself
may cause
incorrect constraint substitution. (#GH86769).
+- Clang now allowed the value of unroll count to be zero in ``#pragma GCC
unroll`` and ``#p
yronglin wrote:
Thanks for your review! @Endilll @tbaederr
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation
Loc) {
if (R.isInvalid())
return true;
- bool ValueIsPositive = ValueAPS.isStrictlyPositive();
+ // GCC allows the value of unroll count to be 0.
+ // https://gcc.gnu.org/onlinedocs/gcc/Loop-
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
1 nit, else this lgtm.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/88666
>From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001
From: yronglin
Date: Mon, 15 Apr 2024 00:36:06 +0800
Subject: [PATCH 1/4] [Clang] Allow the value of unroll count to be zero in
'#pragma
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/88666
>From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001
From: yronglin
Date: Mon, 15 Apr 2024 00:36:06 +0800
Subject: [PATCH 1/4] [Clang] Allow the value of unroll count to be zero in
'#pragma
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation
Loc) {
if (R.isInvalid())
return true;
- bool ValueIsPositive = ValueAPS.isStrictlyPositive();
+ // GCC allows the value of unroll count to be 0.
+ // https://gcc.gnu.org/onlinedocs/gcc/Loop-
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation
Loc) {
if (R.isInvalid())
return true;
- bool ValueIsPositive = ValueAPS.isStrictlyPositive();
+ // GCC allows the value of unroll count to be 0.
+ // https://gcc.gnu.org/onlinedocs/gcc/Loop-
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation
Loc) {
if (R.isInvalid())
return true;
- bool ValueIsPositive = ValueAPS.isStrictlyPositive();
+ // GCC allows the value of unroll count to be 0.
+ // https://gcc.gnu.org/onlinedocs/gcc/Loop-
https://github.com/yronglin updated
https://github.com/llvm/llvm-project/pull/88666
>From 8d48a0bd1cf15b9cf00bc294912b674b5f94a11c Mon Sep 17 00:00:00 2001
From: yronglin
Date: Mon, 15 Apr 2024 00:36:06 +0800
Subject: [PATCH 1/4] [Clang] Allow the value of unroll count to be zero in
'#pragma
yronglin wrote:
Wait for CI green, but seems windows bots fall into a trouble.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> Wait for CI green, but seems windows bots fall into a trouble.
Windows bot is typically pretty far behind(usually 4-5 hrs during the day), but
13 hours is a heck of a delay! I think all we can do is wait :/
https://github.com/llvm/llvm-project/pull/88666
__
https://github.com/AaronBallman approved this pull request.
LGTM assuming precommit CI on Windows eventually comes back green.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
yronglin wrote:
> LGTM assuming precommit CI on Windows eventually comes back green.
Thanks for your review!
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
yronglin wrote:
Hope CI can be come back soon
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yronglin wrote:
Thanks for all the reviewers! The last CI was green, but there was a conflict
in ReleaseNotes. After I merged the main branch and resolved the conflict,
there was a build issue with CI, but it was not caused by this PR(Seems the
root cause is flang). therefor, I'll merge this P
https://github.com/yronglin closed
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexfh wrote:
After this patch clang doesn't accept integer template argument as a parameter
of `#pragma unroll` (https://gcc.godbolt.org/z/Woc7zs3sK):
```
template
void test(int *List, int Length) {
int i = 0;
#pragma unroll Unroll
while (i + 1 < Length) {
List[i] = i;
}
}
```
```
:4
ronlieb wrote:
our downstream CI for amdgpu build of rccl, rocblas and rocSolver are seeing
this assertions due to this patch
[2024-04-21T03:28:05.859Z] clang-19:
/jenkins/workspace/compiler-psdb-amd-staging/repos/external/llvm-project/clang/lib/AST/ExprConstant.cpp:15721:
bool clang::Expr::Ev
Endilll wrote:
@ronlieb nice and small reproducer would definitely help resolving this.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shiltian wrote:
@alexfh @ronlieb @Endilll fix in
https://github.com/llvm/llvm-project/pull/89567.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
yronglin wrote:
Thank you report this issue! @ronlieb Could you please provide a simple
reproducer, we can use it to strengthen clang's test.
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
alexfh wrote:
Thanks for the prompt fix!
https://github.com/llvm/llvm-project/pull/88666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
37 matches
Mail list logo