blob: 447007439fbbddabe6de050baa48aca454479116 [file] [log] [blame]
Dan Gohman40503392009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86-64 | FileCheck %s --check-prefix=CHECK-64
Dan Gohman24708182010-08-18 20:32:46 +00002; RUN: llc < %s -march=x86-64 -o /dev/null -stats -info-output-file - | grep asm-printer | grep 12
Dan Gohman40503392009-09-08 23:54:48 +00003; RUN: llc < %s -march=x86 | FileCheck %s --check-prefix=CHECK-32
Dan Gohmana95cbb02007-09-07 21:32:51 +00004
5declare void @bar(double %x)
6declare void @barf(float %x)
7
Dale Johannesen0de94a12008-03-31 23:20:09 +00008define double @foo() nounwind {
Chris Lattner072198a2009-07-08 18:48:24 +00009
Dan Gohmana95cbb02007-09-07 21:32:51 +000010 call void @bar(double 0.0)
11 ret double 0.0
Chris Lattner072198a2009-07-08 18:48:24 +000012
13;CHECK-32: foo:
14;CHECK-32: call
15;CHECK-32: fldz
16;CHECK-32: ret
17
18;CHECK-64: foo:
19;CHECK-64: pxor
20;CHECK-64: call
21;CHECK-64: pxor
22;CHECK-64: ret
Dan Gohmana95cbb02007-09-07 21:32:51 +000023}
Chris Lattner072198a2009-07-08 18:48:24 +000024
25
Dale Johannesen0de94a12008-03-31 23:20:09 +000026define float @foof() nounwind {
Dan Gohmana95cbb02007-09-07 21:32:51 +000027 call void @barf(float 0.0)
28 ret float 0.0
Chris Lattner072198a2009-07-08 18:48:24 +000029
30;CHECK-32: foof:
31;CHECK-32: call
32;CHECK-32: fldz
33;CHECK-32: ret
34
35;CHECK-64: foof:
36;CHECK-64: pxor
37;CHECK-64: call
38;CHECK-64: pxor
39;CHECK-64: ret
Dan Gohmana95cbb02007-09-07 21:32:51 +000040}