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

Unified Diff: crosstest/test_arith_sqrt.ll

Issue 384443003: Add scalar lowering for sqrt intrinsic. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: whitespace Created 6 years, 5 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_main.cpp ('k') | crosstest/test_fcmp_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_arith_sqrt.ll
diff --git a/crosstest/test_arith_sqrt.ll b/crosstest/test_arith_sqrt.ll
new file mode 100644
index 0000000000000000000000000000000000000000..2550aebd5eb7eb0389aeb1d80f89b73b816e3bb1
--- /dev/null
+++ b/crosstest/test_arith_sqrt.ll
@@ -0,0 +1,14 @@
+target triple = "i686-pc-linux-gnu"
+
+declare float @llvm.sqrt.f32(float)
+declare double @llvm.sqrt.f64(double)
+
+define float @_Z6mySqrtf(float %a) {
+ %x = call float @llvm.sqrt.f32(float %a)
+ ret float %x
+}
+
+define double @_Z6mySqrtd(double %a) {
+ %x = call double @llvm.sqrt.f64(double %a)
+ ret double %x
+}
« no previous file with comments | « crosstest/test_arith_main.cpp ('k') | crosstest/test_fcmp_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698