reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -stop-after=machine-cp < %s | \
; RUN: FileCheck --check-prefix=32BIT %s

; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -stop-after=machine-cp < %s | \
; RUN: FileCheck --check-prefix=64BIT %s

@f1 = global float 0.000000e+00, align 4
@d1 = global double 0.000000e+00, align 8

define void @call_test_float() {
entry:
; 32BIT: renamable $r3 = LWZtoc @f1, $r2 :: (load 4 from got)
; 32BIT: renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load 4 from @f1)
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
; 32BIT: BL_NOP <mcsymbol .test_float>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $r2, implicit-def $r1
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1

; 64BIT: renamable $x3 = LDtoc @f1, $x2 :: (load 8 from got)
; 64BIT: renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load 4 from @f1)
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
; 64BIT: BL8_NOP <mcsymbol .test_float>, csr_aix64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $x2, implicit-def $r1
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1

  %0 = load float, float* @f1, align 4
  call void @test_float(float %0)
  ret void
}

declare void @test_float(float)

define void @call_test_floats() {
entry:
; 32BIT: renamable $r3 = LWZtoc @f1, $r2 :: (load 4 from got)
; 32BIT: renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load 4 from @f1)
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
; 32BIT: $f2 = COPY renamable $f1
; 32BIT: $f3 = COPY renamable $f1
; 32BIT: BL_NOP <mcsymbol .test_floats>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit $r2, implicit-def $r1
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1

; 64BIT: renamable $x3 = LDtoc @f1, $x2 :: (load 8 from got)
; 64BIT: renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load 4 from @f1)
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
; 64BIT: $f2 = COPY renamable $f1
; 64BIT: $f3 = COPY renamable $f1
; 64BIT: BL8_NOP <mcsymbol .test_floats>, csr_aix64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit $x2, implicit-def $r1
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1

  %0 = load float, float* @f1, align 4
  call void @test_floats(float %0, float %0, float %0)
  ret void
}

declare void @test_floats(float, float, float)

define void @call_test_double() {
entry:
; 32BIT: renamable $r3 = LWZtoc @d1, $r2 :: (load 4 from got)
; 32BIT: renamable $f1 = LFD 0, killed renamable $r3 :: (dereferenceable load 8 from @d1)
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
; 32BIT: BL_NOP <mcsymbol .test_double>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $r2, implicit-def $r1
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1

; 64BIT: renamable $x3 = LDtoc @d1, $x2 :: (load 8 from got)
; 64BIT: renamable $f1 = LFD 0, killed renamable $x3 :: (dereferenceable load 8 from @d1)
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
; 64BIT: BL8_NOP <mcsymbol .test_double>, csr_aix64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $x2, implicit-def $r1
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1

  %0 = load double, double* @d1, align 8
  call void @test_double(double %0)
  ret void
}

declare void @test_double(double)

define void @call_test_fpr_max() {
entry:
; 32BIT: renamable $r3 = LWZtoc @d1, $r2 :: (load 4 from got)
; 32BIT: renamable $f1 = LFD 0, killed renamable $r3 :: (dereferenceable load 8 from @d1)
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
; 32BIT: $f2 = COPY renamable $f1
; 32BIT: $f3 = COPY renamable $f1
; 32BIT: $f4 = COPY renamable $f1
; 32BIT: $f5 = COPY renamable $f1
; 32BIT: $f6 = COPY renamable $f1
; 32BIT: $f7 = COPY renamable $f1
; 32BIT: $f8 = COPY renamable $f1
; 32BIT: $f9 = COPY renamable $f1
; 32BIT: $f10 = COPY renamable $f1
; 32BIT: $f11 = COPY renamable $f1
; 32BIT: $f12 = COPY renamable $f1
; 32BIT: $f13 = COPY renamable $f1
; 32BIT: BL_NOP <mcsymbol .test_fpr_max>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $r2, implicit-def $r1
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1

; 64BIT: renamable $x3 = LDtoc @d1, $x2 :: (load 8 from got)
; 64BIT: renamable $f1 = LFD 0, killed renamable $x3 :: (dereferenceable load 8 from @d1)
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
; 64BIT: $f2 = COPY renamable $f1
; 64BIT: $f3 = COPY renamable $f1
; 64BIT: $f4 = COPY renamable $f1
; 64BIT: $f5 = COPY renamable $f1
; 64BIT: $f6 = COPY renamable $f1
; 64BIT: $f7 = COPY renamable $f1
; 64BIT: $f8 = COPY renamable $f1
; 64BIT: $f9 = COPY renamable $f1
; 64BIT: $f10 = COPY renamable $f1
; 64BIT: $f11 = COPY renamable $f1
; 64BIT: $f12 = COPY renamable $f1
; 64BIT: $f13 = COPY renamable $f1
; 64BIT: BL8_NOP <mcsymbol .test_fpr_max>, csr_aix64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $x2, implicit-def $r1
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1

  %0 = load double, double* @d1, align 8
  call void @test_fpr_max(double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0)
  ret void
}

declare void @test_fpr_max(double, double, double, double, double, double, double, double, double, double, double, double, double)

define void @call_test_mix() {
entry:
; 32BIT: renamable $r3 = LWZtoc @f1, $r2 :: (load 4 from got)
; 32BIT: renamable $r4 = LWZtoc @d1, $r2 :: (load 4 from got)
; 32BIT: renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load 4 from @f1)
; 32BIT: renamable $f2 = LFD 0, killed renamable $r4 :: (dereferenceable load 8 from @d1)
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
; 32BIT: $r4 = LI 1
; 32BIT: $r7 = LI 97
; 32BIT: BL_NOP <mcsymbol .test_mix>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $r4, implicit $f2, implicit killed $r7, implicit $r2, implicit-def $r1
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1

; 64BIT: renamable $x3 = LDtoc @f1, $x2 :: (load 8 from got)
; 64BIT: renamable $x4 = LDtoc @d1, $x2 :: (load 8 from got)
; 64BIT: renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load 4 from @f1)
; 64BIT: renamable $f2 = LFD 0, killed renamable $x4 :: (dereferenceable load 8 from @d1)
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
; 64BIT: $x4 = LI8 1
; 64BIT: $x6 = LI8 97
; 64BIT: BL8_NOP <mcsymbol .test_mix>, csr_aix64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $x4, implicit $f2, implicit killed $x6, implicit $x2, implicit-def $r1
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1

  %0 = load float, float* @f1, align 4
  %1 = load double, double* @d1, align 8
  call void @test_mix(float %0, i32 1, double %1, i8 signext 97)
  ret void
}

declare void @test_mix(float, i32, double, i8 signext)