Created
March 27, 2025 04:45
-
-
Save raphlinus/092bf3a3139e1ef02c712db74c37f3e5 to your computer and use it in GitHub Desktop.
First code from stickshift
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
// Input: | |
// fn foo(x: [f32; 4], y: f32) -> [f32; 4] { | |
// x; x * (x - 2.0) * y | |
// } | |
fn foo(x: [f32; 4], y: f32) -> [f32; 4] { | |
unsafe { | |
let v__0 = ::core::mem::transmute::<[f32; 4usize], ::core::arch::aarch64::float32x4_t>(x); | |
let v__1 = y; | |
let v__2 = v__0; | |
let v__3 = v__0; | |
let v__4 = v__0; | |
let v__5 = 2f32; | |
let v__6 = ::core::arch::aarch64::vsubq_f32(v__4, ::core::arch::aarch64::vdupq_n_f32(v__5)); | |
let v__7 = ::core::arch::aarch64::vmulq_f32(v__3, v__6); | |
let v__8 = v__1; | |
let v__9 = ::core::arch::aarch64::vmulq_f32(v__7, ::core::arch::aarch64::vdupq_n_f32(v__8)); | |
return ::core::mem::transmute::<::core::arch::aarch64::float32x4_t, [f32; 4usize]>(v__9); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment