-
-
Save ArchRobison/d0f606b03ac604f43fbe to your computer and use it in GitHub Desktop.
Example from http://reviews.llvm.org/D14185
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define void @julia_load_array_of_float([4 x float]* %a, [4 x float]* %b, [4 x float]* %c) { | |
top: | |
%a_arr = load [4 x float], [4 x float]* %a, align 4 | |
%a0 = extractvalue [4 x float] %a_arr, 0 | |
%a2 = extractvalue [4 x float] %a_arr, 2 | |
%a1 = extractvalue [4 x float] %a_arr, 1 | |
%b_arr = load [4 x float], [4 x float]* %b, align 4 | |
%b0 = extractvalue [4 x float] %b_arr, 0 | |
%b2 = extractvalue [4 x float] %b_arr, 2 | |
%b1 = extractvalue [4 x float] %b_arr, 1 | |
%a3 = extractvalue [4 x float] %a_arr, 3 | |
%c1 = fsub float %a1, %b1 | |
%b3 = extractvalue [4 x float] %b_arr, 3 | |
%c0 = fsub float %a0, %b0 | |
%c2 = fsub float %a2, %b2 | |
%c_arr0 = insertvalue [4 x float] undef, float %c0, 0 | |
%c_arr1 = insertvalue [4 x float] %c_arr0, float %c1, 1 | |
%c3 = fsub float %a3, %b3 | |
%c_arr2 = insertvalue [4 x float] %c_arr1, float %c2, 2 | |
%c_arr3 = insertvalue [4 x float] %c_arr2, float %c3, 3 | |
store [4 x float] %c_arr3, [4 x float]* %c, align 4 | |
ret void | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment