1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
14 ; CHECK-LABEL: name: add
15 ; CHECK: %res:_(s64) = G_CONSTANT i64 42
16 ; CHECK: $x0 = COPY %res(s64)
17 ; CHECK: RET_ReallyLR implicit $x0
18 %a:_(s64) = G_CONSTANT i64 40
19 %b:_(s64) = G_CONSTANT i64 2
20 %res:_(s64) = G_ADD %a, %b
22 RET_ReallyLR implicit $x0
35 ; CHECK-LABEL: name: sub
36 ; CHECK: %res:_(s64) = G_CONSTANT i64 38
37 ; CHECK: $x0 = COPY %res(s64)
38 ; CHECK: RET_ReallyLR implicit $x0
39 %a:_(s64) = G_CONSTANT i64 40
40 %b:_(s64) = G_CONSTANT i64 2
41 %res:_(s64) = G_SUB %a, %b
43 RET_ReallyLR implicit $x0
56 ; CHECK-LABEL: name: mul
57 ; CHECK: %res:_(s64) = G_CONSTANT i64 80
58 ; CHECK: $x0 = COPY %res(s64)
59 ; CHECK: RET_ReallyLR implicit $x0
60 %a:_(s64) = G_CONSTANT i64 40
61 %b:_(s64) = G_CONSTANT i64 2
62 %res:_(s64) = G_MUL %a, %b
64 RET_ReallyLR implicit $x0
77 ; CHECK-LABEL: name: and
78 ; CHECK: %res:_(s64) = G_CONSTANT i64 0
79 ; CHECK: $x0 = COPY %res(s64)
80 ; CHECK: RET_ReallyLR implicit $x0
81 %a:_(s64) = G_CONSTANT i64 40
82 %b:_(s64) = G_CONSTANT i64 2
83 %res:_(s64) = G_AND %a, %b
85 RET_ReallyLR implicit $x0
98 ; CHECK-LABEL: name: or
99 ; CHECK: %res:_(s64) = G_CONSTANT i64 62
100 ; CHECK: $x0 = COPY %res(s64)
101 ; CHECK: RET_ReallyLR implicit $x0
102 %a:_(s64) = G_CONSTANT i64 42
103 %b:_(s64) = G_CONSTANT i64 22
104 %res:_(s64) = G_OR %a, %b
106 RET_ReallyLR implicit $x0
119 ; CHECK-LABEL: name: xor
120 ; CHECK: %res:_(s64) = G_CONSTANT i64 12
121 ; CHECK: $x0 = COPY %res(s64)
122 ; CHECK: RET_ReallyLR implicit $x0
123 %a:_(s64) = G_CONSTANT i64 8
124 %b:_(s64) = G_CONSTANT i64 4
125 %res:_(s64) = G_XOR %a, %b
127 RET_ReallyLR implicit $x0