File: double-previous-failure.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (88 lines) | stat: -rw-r--r-- 2,993 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=riscv32 -mattr=+d -target-abi=ilp32 -verify-machineinstrs < %s \
; RUN:   | FileCheck -check-prefix=RV32IFD %s
; RUN: llc -mtriple=riscv32 -mattr=+zdinx -target-abi=ilp32 -verify-machineinstrs < %s \
; RUN:   | FileCheck -check-prefix=RV32IZFINXZDINX %s

define double @test(double %a) nounwind {
; RV32IFD-LABEL: test:
; RV32IFD:       # %bb.0:
; RV32IFD-NEXT:    ret
;
; RV32IZFINXZDINX-LABEL: test:
; RV32IZFINXZDINX:       # %bb.0:
; RV32IZFINXZDINX-NEXT:    ret
  ret double %a
}

; This previously failed complaining of multiple vreg defs due to an ABI
; lowering issue.

define i32 @main() nounwind {
; RV32IFD-LABEL: main:
; RV32IFD:       # %bb.0: # %entry
; RV32IFD-NEXT:    addi sp, sp, -16
; RV32IFD-NEXT:    sw ra, 12(sp) # 4-byte Folded Spill
; RV32IFD-NEXT:    lui a1, 262144
; RV32IFD-NEXT:    li a0, 0
; RV32IFD-NEXT:    call test@plt
; RV32IFD-NEXT:    sw a0, 0(sp)
; RV32IFD-NEXT:    sw a1, 4(sp)
; RV32IFD-NEXT:    fld fa5, 0(sp)
; RV32IFD-NEXT:    lui a0, %hi(.LCPI1_0)
; RV32IFD-NEXT:    fld fa4, %lo(.LCPI1_0)(a0)
; RV32IFD-NEXT:    lui a0, %hi(.LCPI1_1)
; RV32IFD-NEXT:    fld fa3, %lo(.LCPI1_1)(a0)
; RV32IFD-NEXT:    flt.d a0, fa5, fa4
; RV32IFD-NEXT:    flt.d a1, fa3, fa5
; RV32IFD-NEXT:    or a0, a0, a1
; RV32IFD-NEXT:    beqz a0, .LBB1_2
; RV32IFD-NEXT:  # %bb.1: # %if.then
; RV32IFD-NEXT:    call abort@plt
; RV32IFD-NEXT:  .LBB1_2: # %if.end
; RV32IFD-NEXT:    call exit@plt
;
; RV32IZFINXZDINX-LABEL: main:
; RV32IZFINXZDINX:       # %bb.0: # %entry
; RV32IZFINXZDINX-NEXT:    addi sp, sp, -16
; RV32IZFINXZDINX-NEXT:    sw ra, 12(sp) # 4-byte Folded Spill
; RV32IZFINXZDINX-NEXT:    lui a1, 262144
; RV32IZFINXZDINX-NEXT:    li a0, 0
; RV32IZFINXZDINX-NEXT:    call test@plt
; RV32IZFINXZDINX-NEXT:    sw a0, 0(sp)
; RV32IZFINXZDINX-NEXT:    sw a1, 4(sp)
; RV32IZFINXZDINX-NEXT:    lw a0, 0(sp)
; RV32IZFINXZDINX-NEXT:    lw a1, 4(sp)
; RV32IZFINXZDINX-NEXT:    lui a2, %hi(.LCPI1_0)
; RV32IZFINXZDINX-NEXT:    lw a3, %lo(.LCPI1_0+4)(a2)
; RV32IZFINXZDINX-NEXT:    lw a2, %lo(.LCPI1_0)(a2)
; RV32IZFINXZDINX-NEXT:    lui a4, %hi(.LCPI1_1)
; RV32IZFINXZDINX-NEXT:    lw a5, %lo(.LCPI1_1+4)(a4)
; RV32IZFINXZDINX-NEXT:    lw a4, %lo(.LCPI1_1)(a4)
; RV32IZFINXZDINX-NEXT:    flt.d a2, a0, a2
; RV32IZFINXZDINX-NEXT:    flt.d a0, a4, a0
; RV32IZFINXZDINX-NEXT:    or a0, a2, a0
; RV32IZFINXZDINX-NEXT:    beqz a0, .LBB1_2
; RV32IZFINXZDINX-NEXT:  # %bb.1: # %if.then
; RV32IZFINXZDINX-NEXT:    call abort@plt
; RV32IZFINXZDINX-NEXT:  .LBB1_2: # %if.end
; RV32IZFINXZDINX-NEXT:    call exit@plt
entry:
  %call = call double @test(double 2.000000e+00)
  %cmp = fcmp olt double %call, 2.400000e-01
  %cmp2 = fcmp ogt double %call, 2.600000e-01
  %or.cond = or i1 %cmp, %cmp2
  br i1 %or.cond, label %if.then, label %if.end

if.then:
  call void @abort()
  unreachable

if.end:
  call void @exit(i32 0)
  unreachable
}

declare void @abort()

declare void @exit(i32)