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
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
---
name: add
alignment: 4
legalized: true
liveins:
- { reg: '$w0' }
body: |
bb.1.entry:
liveins: $x0
; CHECK-LABEL: name: add
; CHECK: %res:_(s64) = G_CONSTANT i64 42
; CHECK: $x0 = COPY %res(s64)
; CHECK: RET_ReallyLR implicit $x0
%a:_(s64) = G_CONSTANT i64 40
%b:_(s64) = G_CONSTANT i64 2
%res:_(s64) = G_ADD %a, %b
$x0 = COPY %res(s64)
RET_ReallyLR implicit $x0
...
---
name: sub
alignment: 4
legalized: true
liveins:
- { reg: '$w0' }
body: |
bb.1.entry:
liveins: $x0
; CHECK-LABEL: name: sub
; CHECK: %res:_(s64) = G_CONSTANT i64 38
; CHECK: $x0 = COPY %res(s64)
; CHECK: RET_ReallyLR implicit $x0
%a:_(s64) = G_CONSTANT i64 40
%b:_(s64) = G_CONSTANT i64 2
%res:_(s64) = G_SUB %a, %b
$x0 = COPY %res(s64)
RET_ReallyLR implicit $x0
...
---
name: mul
alignment: 4
legalized: true
liveins:
- { reg: '$w0' }
body: |
bb.1.entry:
liveins: $x0
; CHECK-LABEL: name: mul
; CHECK: %res:_(s64) = G_CONSTANT i64 80
; CHECK: $x0 = COPY %res(s64)
; CHECK: RET_ReallyLR implicit $x0
%a:_(s64) = G_CONSTANT i64 40
%b:_(s64) = G_CONSTANT i64 2
%res:_(s64) = G_MUL %a, %b
$x0 = COPY %res(s64)
RET_ReallyLR implicit $x0
...
---
name: and
alignment: 4
legalized: true
liveins:
- { reg: '$w0' }
body: |
bb.1.entry:
liveins: $x0
; CHECK-LABEL: name: and
; CHECK: %res:_(s64) = G_CONSTANT i64 0
; CHECK: $x0 = COPY %res(s64)
; CHECK: RET_ReallyLR implicit $x0
%a:_(s64) = G_CONSTANT i64 40
%b:_(s64) = G_CONSTANT i64 2
%res:_(s64) = G_AND %a, %b
$x0 = COPY %res(s64)
RET_ReallyLR implicit $x0
...
---
name: or
alignment: 4
legalized: true
liveins:
- { reg: '$w0' }
body: |
bb.1.entry:
liveins: $x0
; CHECK-LABEL: name: or
; CHECK: %res:_(s64) = G_CONSTANT i64 62
; CHECK: $x0 = COPY %res(s64)
; CHECK: RET_ReallyLR implicit $x0
%a:_(s64) = G_CONSTANT i64 42
%b:_(s64) = G_CONSTANT i64 22
%res:_(s64) = G_OR %a, %b
$x0 = COPY %res(s64)
RET_ReallyLR implicit $x0
...
---
name: xor
alignment: 4
legalized: true
liveins:
- { reg: '$w0' }
body: |
bb.1.entry:
liveins: $x0
; CHECK-LABEL: name: xor
; CHECK: %res:_(s64) = G_CONSTANT i64 12
; CHECK: $x0 = COPY %res(s64)
; CHECK: RET_ReallyLR implicit $x0
%a:_(s64) = G_CONSTANT i64 8
%b:_(s64) = G_CONSTANT i64 4
%res:_(s64) = G_XOR %a, %b
$x0 = COPY %res(s64)
RET_ReallyLR implicit $x0
...
|