blob: d5b2b9fa0502ac564aa749903e904f08b306b2c6 [file] [log] [blame]
# 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
...