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
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -verify-machineinstrs -mtriple=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
...
---
name: s16
tracksRegLiveness: true
body: |
bb.0:
liveins: $h0, $h1, $h2
; CHECK-LABEL: name: s16
; CHECK: liveins: $h0, $h1, $h2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %op0:_(s16) = COPY $h0
; CHECK-NEXT: %op1:_(s16) = COPY $h1
; CHECK-NEXT: %op2:_(s16) = COPY $h2
; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %op0(s16)
; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %op1(s16)
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s32) = G_FMUL [[FPEXT]], [[FPEXT1]]
; CHECK-NEXT: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[FMUL]](s32)
; CHECK-NEXT: [[FPEXT2:%[0-9]+]]:_(s32) = G_FPEXT [[FPTRUNC]](s16)
; CHECK-NEXT: [[FPEXT3:%[0-9]+]]:_(s32) = G_FPEXT %op2(s16)
; CHECK-NEXT: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[FPEXT2]], [[FPEXT3]]
; CHECK-NEXT: %fmad:_(s16) = G_FPTRUNC [[FADD]](s32)
; CHECK-NEXT: $h0 = COPY %fmad(s16)
; CHECK-NEXT: RET_ReallyLR implicit $h0
%op0:_(s16) = COPY $h0
%op1:_(s16) = COPY $h1
%op2:_(s16) = COPY $h2
%fmad:_(s16) = G_FMAD %op0, %op1, %op2
$h0 = COPY %fmad
RET_ReallyLR implicit $h0
...
---
name: s32
tracksRegLiveness: true
body: |
bb.0:
liveins: $s0, $s1, $s2
; CHECK-LABEL: name: s32
; CHECK: liveins: $s0, $s1, $s2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %op0:_(s32) = COPY $s0
; CHECK-NEXT: %op1:_(s32) = COPY $s1
; CHECK-NEXT: %op2:_(s32) = COPY $s2
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s32) = G_FMUL %op0, %op1
; CHECK-NEXT: %fmad:_(s32) = G_FADD [[FMUL]], %op2
; CHECK-NEXT: $s0 = COPY %fmad(s32)
; CHECK-NEXT: RET_ReallyLR implicit $s0
%op0:_(s32) = COPY $s0
%op1:_(s32) = COPY $s1
%op2:_(s32) = COPY $s2
%fmad:_(s32) = G_FMAD %op0, %op1, %op2
$s0 = COPY %fmad
RET_ReallyLR implicit $s0
...
---
name: s64
tracksRegLiveness: true
body: |
bb.0:
liveins: $d0, $d1, $d2
; CHECK-LABEL: name: s64
; CHECK: liveins: $d0, $d1, $d2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %op0:_(s64) = COPY $d0
; CHECK-NEXT: %op1:_(s64) = COPY $d1
; CHECK-NEXT: %op2:_(s64) = COPY $d2
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL %op0, %op1
; CHECK-NEXT: %fmad:_(s64) = G_FADD [[FMUL]], %op2
; CHECK-NEXT: $d0 = COPY %fmad(s64)
; CHECK-NEXT: RET_ReallyLR implicit $d0
%op0:_(s64) = COPY $d0
%op1:_(s64) = COPY $d1
%op2:_(s64) = COPY $d2
%fmad:_(s64) = G_FMAD %op0, %op1, %op2
$d0 = COPY %fmad
RET_ReallyLR implicit $d0
...
---
name: v2s32
tracksRegLiveness: true
body: |
bb.0:
liveins: $d0, $d1, $d2
; CHECK-LABEL: name: v2s32
; CHECK: liveins: $d0, $d1, $d2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %op0:_(<2 x s32>) = COPY $d0
; CHECK-NEXT: %op1:_(<2 x s32>) = COPY $d1
; CHECK-NEXT: %op2:_(<2 x s32>) = COPY $d2
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<2 x s32>) = G_FMUL %op0, %op1
; CHECK-NEXT: %fmad:_(<2 x s32>) = G_FADD [[FMUL]], %op2
; CHECK-NEXT: $d0 = COPY %fmad(<2 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $d0
%op0:_(<2 x s32>) = COPY $d0
%op1:_(<2 x s32>) = COPY $d1
%op2:_(<2 x s32>) = COPY $d2
%fmad:_(<2 x s32>) = G_FMAD %op0, %op1, %op2
$d0 = COPY %fmad
RET_ReallyLR implicit $d0
...
---
name: v4s32
tracksRegLiveness: true
body: |
bb.0:
liveins: $q0, $q1, $q2
; CHECK-LABEL: name: v4s32
; CHECK: liveins: $q0, $q1, $q2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %op0:_(<4 x s32>) = COPY $q0
; CHECK-NEXT: %op1:_(<4 x s32>) = COPY $q1
; CHECK-NEXT: %op2:_(<4 x s32>) = COPY $q2
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<4 x s32>) = G_FMUL %op0, %op1
; CHECK-NEXT: %fmad:_(<4 x s32>) = G_FADD [[FMUL]], %op2
; CHECK-NEXT: $q0 = COPY %fmad(<4 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%op0:_(<4 x s32>) = COPY $q0
%op1:_(<4 x s32>) = COPY $q1
%op2:_(<4 x s32>) = COPY $q2
%fmad:_(<4 x s32>) = G_FMAD %op0, %op1, %op2
$q0 = COPY %fmad
RET_ReallyLR implicit $q0
...
---
name: v2s64
tracksRegLiveness: true
body: |
bb.0:
liveins: $q0, $q1, $q2
; CHECK-LABEL: name: v2s64
; CHECK: liveins: $q0, $q1, $q2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %op0:_(<2 x s64>) = COPY $q0
; CHECK-NEXT: %op1:_(<2 x s64>) = COPY $q1
; CHECK-NEXT: %op2:_(<2 x s64>) = COPY $q2
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<2 x s64>) = G_FMUL %op0, %op1
; CHECK-NEXT: %fmad:_(<2 x s64>) = G_FADD [[FMUL]], %op2
; CHECK-NEXT: $q0 = COPY %fmad(<2 x s64>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%op0:_(<2 x s64>) = COPY $q0
%op1:_(<2 x s64>) = COPY $q1
%op2:_(<2 x s64>) = COPY $q2
%fmad:_(<2 x s64>) = G_FMAD %op0, %op1, %op2
$q0 = COPY %fmad
RET_ReallyLR implicit $q0
...
|