-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build on AIX fails because of "restrict" pointers #620
Comments
Code first appeared in: dbeebe72#diff-1ea8331903552f12aee1bc3924cd0780R658 @fodevaux do you remember what the code was supposed to do. AFAIK I do not see the point of |
Sorry, I won't be able to help you in this one... |
The original patch I submitted had no change to the lossless compress/decompress and did not have the restrict keywords. I wrote in the (GCC specific) single vector variable before that was wrote out with the expanded, autovectorized code and wrapped with SSE intrinsics. Note: I did not apply it to the lossless code due to the 80/20 rule, anchored to specific integer math. |
I refactored those loops a bit from what Dzonatas wrote. The restrict pointers were an attempt to make GCC's autovectorizer happy, at the time if all pointers were not restrict then it would refuse to vectorize. Current GCC is smarter now and may not require this. I guess for now, you could just drop the 'restrict'. This code is all a bit hairy and I should probably re-work it anyway. It was all an attempt to keep the icache/BTB footprint down by merging some of the original loops, but the optimizer seems insistent on duplicating them back anyway. :P |
Re-reading the spec, it seems using restrict is indeed invalid here. If that kills autovectorization, then oh well... |
I'm trying to build OpenJPEG on AIX with the xlc compiler. I invoked cmake like this:
Running make fails with the following error:
The problematic source code is this:
If I understand the C99 standard correctly, then the assignment
fl = fw
is undefined behavior because fl and fw are declared at the same level. See example 4 in "6.7.3.1 Formal definition of restrict" in the C99 standard:The text was updated successfully, but these errors were encountered: