https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #13 from Aldy Hernandez ---
(In reply to Aldy Hernandez from comment #10)
> Created attachment 58202 [details]
> proof of concept implementing a range-op entry for builtin_assume_aligned
>
> Something like this (properly coded and e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #12 from GCC Commits ---
The master branch has been updated by Aldy Hernandez :
https://gcc.gnu.org/g:c400b2100719d0a9e5989c63e0827b9e98919df3
commit r15-504-gc400b2100719d0a9e5989c63e0827b9e98919df3
Author: Aldy Hernandez
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #11 from Aldy Hernandez ---
Just to clarify. prange as well as irange keep a value/mask pair where we can
store alignment info, so every calculation (range-op) along the way can track
this properly.
Now, for pointers we loose this
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #10 from Aldy Hernandez ---
Created attachment 58202
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58202&action=edit
proof of concept implementing a range-op entry for builtin_assume_aligned
Something like this (properly code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #9 from Aldy Hernandez ---
(In reply to Jakub Jelinek from comment #7)
> The above examples just show misunderstanding what __builtin_assume_aligned
> is and what it is not. You need to use the result of the built-in function
> in t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #8 from Pratik Chowdhury ---
> if you just try to compare __builtin_assume_aligned (x, 32) == x, it will
> just fold as always true
Aah. Dead code elimination.
> CCing Aldy/Andrew for whether prange can or could be taught to handl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
Jakub Jelinek changed:
What|Removed |Added
CC||aldyh at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #6 from Pratik Chowdhury ---
> [[assume((uintptr_t(x_array) & (32-1)) == 0)]];
The Parans in the & have definitely given someone sleepless nights LOL. I
myself was saved by the warnings.
> Right now we don't always prop back what i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
Keywords|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #4 from Andrew Pinski ---
Oh this is the more correct syntax:
[[assume((uintptr_t(x_array) & (32-1)) == 0)]];
[[assume((uintptr_t(mul_array) & (32-1)) == 0)]];
[[assume((uintptr_t(add_array) & (32-1)) == 0)]];
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #3 from Pratik Chowdhury ---
Yeah definitely.
My bad.
Sorry.
@Andrew Pinski [however even that change does not seem to change the results
for GCC with Aligned Loads not being used](https://gcc.godbolt.org/z/9WbMbePc1)
Added the m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #2 from Andrew Pinski ---
I suspect the syntax you want instead is:
[[assume(uintptr_t(x_array) & (32-1) == 0]];
Becuase __builtin_assume_aligned takes a pointer and returns a pointer that has
the assumed alignment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995
--- Comment #1 from Andrew Pinski ---
Created attachment 58135
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58135&action=edit
testcase
13 matches
Mail list logo