-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Vectorization depends on silly details #16894
Comments
This is #15402 AFACT |
There seems to be multiple issues here.
|
Thanks a bunch for digging into this, @yuyichao. |
I'll check if applying this patch on llvm3.8/3.7 fixes the issue and will submit a pr here if it works.... |
The "silly detail" is basically the order llvm does the optimization or sth similar. The test cast in the LLVM review actually doesn't trigger the issue if running with |
The original check for load CSE or store-to-load forwarding is wrong when the forwarded stored value happened to be a load. Ref JuliaLang/julia#16894 Differential Revision: http://reviews.llvm.org/D21271 Patch by Yichao Yu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272868 91177308-0d34-0410-b5e6-96231b3b80d8
Consider the following functions:
By any reasonable standard, these should be indistinguishable: all I did was split one line into two, storing the result in a temporary variable. However,
yields the following times:
(measured in ns). Naturally,
@code_llvm
reveals thatmysum_simd1(s)
is vectorized, andmysum_simd2(s)
is not.The text was updated successfully, but these errors were encountered: