blob: 5b756b56ee83438bfbb855d42869ceeeaa41cdd6 [file] [log] [blame]
Tanya Lattner2393a242004-11-06 23:08:26 +00001; RUN: llvm-as -f %s -o - | llc
2
Vikram S. Advebd6161d2003-05-28 13:54:41 +00003;; Date: May 27, 2003.
4;; From: test/Programs/MultiSource/McCat-05-eks/QRfact.c
5;; Function: Matrix QRiterate(Matrix A, Matrix U)
6;;
7;; Error: llc produces an invalid register <NULL VALUE> for the
8;; a boolean value computed using setne with a double.
9;;
10;; Cause: In SparcInstrSelection.cpp, for SetCC, when a result of setne
11;; is used for a branch, it can generate a "branch-on-integer-register"
12;; for integer registers. In that case, it never saves the value of
13;; the boolean result. It was attempting to do the same thing for an
14;; FP compare!
15;;
16;; LLC Output:
17;; !****** Outputing Function: QRiterate_1 ******
18;;
19;; .section ".text"
20;; .align 4
21;; .global QRiterate_1
22;; .type QRiterate_1, 2
23;; QRiterate_1:
24;; .L_QRiterate_1_LL_0:
25;; save %o6, -192, %o6
26;; sethi %hh(LLVMGlobal__2), %o1
27;; sethi %lm(LLVMGlobal__2), %o0
28;; or %o1, %hm(LLVMGlobal__2), %o1
29;; sllx %o1, 32, %o1
30;; or %o0, %o1, %o0
31;; or %o0, %lo(LLVMGlobal__2), %o0
32;; ldd [%o0+0], %f32
33;; ba .L_QRiterate_1_LL_1
34;; fcmpd %fcc0, %f0, %f32
35;;
36;; .L_QRiterate_1_LL_1:
37;; brnz <NULL VALUE>, .L_QRiterate_1_LL_1
38;; nop
39;; ba .L_QRiterate_1_LL_2
40;; nop
41;;
42;; .L_QRiterate_1_LL_2:
43;; jmpl %i7+8, %g0
44;; restore %g0, 0, %g0
45;;
46;; .EndOf_QRiterate_1:
47;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1
48;;
49
50target endian = big
51target pointersize = 64
52
53implementation ; Functions:
54
55internal void %QRiterate(double %tmp.212) {
56entry: ; No predecessors!
57 br label %shortcirc_next.1
58
59shortcirc_next.1: ; preds = %entry
60 %tmp.213 = setne double %tmp.212, 0.000000e+00
61 br bool %tmp.213, label %shortcirc_next.1, label %exit.1
62
63exit.1:
64 ret void
65}