mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-31 16:02:52 +01:00
4026d01040
- 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 llvm-svn: 126636
26 lines
417 B
LLVM
26 lines
417 B
LLVM
; RUN: llc < %s -march=ptx | FileCheck %s
|
|
|
|
define ptx_device i32 @t1() {
|
|
; CHECK: mov.s32 r0, 0;
|
|
; CHECK: ret;
|
|
ret i32 0
|
|
}
|
|
|
|
define ptx_device i32 @t2(i32 %x) {
|
|
; CHECK: mov.s32 r0, r1;
|
|
; 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
|
|
}
|