1 ; RUN: llc < %s -march=sparc | FileCheck %s
3 ; TODO: actually fix the codegen to be optimal. At least we don't
4 ; crash for now, though...
6 ;; Bitcast should not do a runtime conversion, but rather emit a
7 ;; constant into integer registers directly.
9 ; CHECK-LABEL: bitcast:
10 ; TODO-CHECK: sethi 1049856, %o0
11 ; TODO-CHECK: sethi 0, %o1
12 define <2 x i32> @bitcast() {
13 %1 = bitcast double 5.0 to <2 x i32>
17 ;; Same thing for a call using a double (which gets passed in integer
20 ; CHECK-LABEL: test_call
21 ; TODO-CHECK: sethi 1049856, %o0
22 ; TODO-CHECK: sethi 0, %o1
23 declare void @a(double)
24 define void @test_call() {
25 call void @a(double 5.0)
29 ;; And for a libcall emitted from the pow intrinsic. (libcall
30 ;; emission happens after SelectionDAG type legalization, so is a bit
31 ;; different than a normal function call. This was crashing before,
32 ;; due to an earlier broken workaround for this issue.)
34 ; CHECK-LABEL: test_intrins_call
35 ; TODO-CHECK: sethi 1049856, %o0
36 ; TODO-CHECK: sethi 0, %o1
37 declare double @llvm.pow.f64(double, double)
38 define double @test_intrins_call() {
39 %1 = call double @llvm.pow.f64(double 2.0, double 2.0)