1 ; RUN: llc < %s -march=sparc | FileCheck %s
2 ; RUN: llc < %s -march=sparcel | FileCheck %s --check-prefix=CHECK-LE
4 ;; Bitcast should not do a runtime conversion, but rather emit a
5 ;; constant into integer registers directly.
7 ; CHECK-LABEL: bitcast:
8 ; CHECK: sethi 1049856, %o0
10 ; CHECK-LE: mov %g0, %o0
11 ; CHECK-LE: sethi 1049856, %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 ; CHECK: sethi 1049856, %o0
23 ; CHECK-LE: mov %g0, %o0
24 ; CHECK-LE: sethi 1049856, %o1
25 declare void @a(double)
26 define void @test_call() {
27 call void @a(double 5.0)
31 ;; And for a libcall emitted from the pow intrinsic. (libcall
32 ;; emission happens after SelectionDAG type legalization, so is a bit
33 ;; different than a normal function call. This was crashing before,
34 ;; due to an earlier broken workaround for this issue.)
36 ; CHECK-LABEL: test_intrins_call
37 ; CHECK: sethi 1048576, %o0
41 ; CHECK-LE: mov %g0, %o0
42 ; CHECK-LE: sethi 1048576, %o1
43 declare double @llvm.pow.f64(double, double)
44 define double @test_intrins_call() {
45 %1 = call double @llvm.pow.f64(double 2.0, double 2.0)