2011-06-21 02:33:26 +08:00
|
|
|
; RUN: llc < %s -march=x86-64 | FileCheck %s
|
2009-09-09 07:54:48 +08:00
|
|
|
; RUN: llc < %s -march=x86-64 | not grep rsp
|
2007-06-18 07:29:57 +08:00
|
|
|
|
|
|
|
define i64 @test1(double %A) {
|
2011-06-21 02:33:26 +08:00
|
|
|
; CHECK: test1
|
|
|
|
; CHECK: movq
|
2007-06-18 07:29:57 +08:00
|
|
|
%B = bitcast double %A to i64
|
|
|
|
ret i64 %B
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test2(i64 %A) {
|
2011-06-21 02:33:26 +08:00
|
|
|
; CHECK: test2
|
|
|
|
; CHECK: movq
|
2007-06-18 07:29:57 +08:00
|
|
|
%B = bitcast i64 %A to double
|
|
|
|
ret double %B
|
|
|
|
}
|
|
|
|
|
2011-06-21 02:33:26 +08:00
|
|
|
define i32 @test3(float %A) {
|
|
|
|
; CHECK: test3
|
|
|
|
; CHECK: movd
|
|
|
|
%B = bitcast float %A to i32
|
|
|
|
ret i32 %B
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test4(i32 %A) {
|
|
|
|
; CHECK: test4
|
|
|
|
; CHECK: movd
|
|
|
|
%B = bitcast i32 %A to float
|
|
|
|
ret float %B
|
|
|
|
}
|
|
|
|
|