aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PTX/mov.ll
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@gmail.com>2011-02-28 06:34:09 +0000
committerChe-Liang Chiou <clchiou@gmail.com>2011-02-28 06:34:09 +0000
commitf71720231f6de9b2b7fe28edd179ae217a105329 (patch)
tree7ed3e644aac2d4be87b13f146f0467761e8e7600 /test/CodeGen/PTX/mov.ll
parentd8d1584c13c554349c235177b2b89cb5117347b2 (diff)
downloadexternal_llvm-f71720231f6de9b2b7fe28edd179ae217a105329.zip
external_llvm-f71720231f6de9b2b7fe28edd179ae217a105329.tar.gz
external_llvm-f71720231f6de9b2b7fe28edd179ae217a105329.tar.bz2
Add preliminary support for .f32 in the PTX backend.
- Add appropriate TableGen patterns for fadd, fsub, fmul. - Add .f32 as the PTX type for the LLVM float type. - Allow parameters, return values, and global variable declarations to accept the float type. - Add appropriate test cases. Patch by Justin Holewinski git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PTX/mov.ll')
-rw-r--r--test/CodeGen/PTX/mov.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/PTX/mov.ll b/test/CodeGen/PTX/mov.ll
index c365e9b..d201a78 100644
--- a/test/CodeGen/PTX/mov.ll
+++ b/test/CodeGen/PTX/mov.ll
@@ -11,3 +11,15 @@ define ptx_device i32 @t2(i32 %x) {
; CHECK: ret;
ret i32 %x
}
+
+define ptx_device float @t3() {
+; CHECK: mov.f32 f0, 0F00000000;
+; CHECK-NEXT: ret;
+ ret float 0.0
+}
+
+define ptx_device float @t4(float %x) {
+; CHECK: mov.f32 f0, f1;
+; CHECK-NEXT: ret;
+ ret float %x
+}