Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: crosstest/test_arith_fabs.ll

Issue 1022573004: Subzero: Add fabs intrinsic support. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crosstest/test_arith.h ('k') | crosstest/test_arith_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_arith_fabs.ll
diff --git a/crosstest/test_arith_fabs.ll b/crosstest/test_arith_fabs.ll
new file mode 100644
index 0000000000000000000000000000000000000000..f600234323969c25b94a9076ca9eef8920ab5d29
--- /dev/null
+++ b/crosstest/test_arith_fabs.ll
@@ -0,0 +1,18 @@
+declare float @llvm.fabs.f32(float)
+declare double @llvm.fabs.f64(double)
+declare <4 x float> @llvm.fabs.v4f32(<4 x float>)
+
+define float @_Z6myFabsf(float %a) {
+ %x = call float @llvm.fabs.f32(float %a)
+ ret float %x
+}
+
+define double @_Z6myFabsd(double %a) {
+ %x = call double @llvm.fabs.f64(double %a)
+ ret double %x
+}
+
+define <4 x float> @_Z6myFabsDv4_f(<4 x float> %a) {
+ %x = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
+ ret <4 x float> %x
+}
« no previous file with comments | « crosstest/test_arith.h ('k') | crosstest/test_arith_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698